none
Unable to fetch values that are stored in dictionary - rest to loop through list RRS feed

  • Question

  • Hello 

    I have list(with only Title field ) which i want to loop through for purpose, web service call is happening it is counting the no of items stored in dictionary object but when i want to fetch single item and store it in a variable of the same type, it's logging empty values.

    Stage:Workflow Initialization
    Log Workflow Initialization to the workflow history list
    Set Variable: ServiceURL to https://domain.sharepoint.com/sites...
    Set Variable: Index to 0
    Build {...} Dictionary (Output to Variable: RequestHeaders )
    Transition to stage
    Go to Web Service Call

    Stage:Web Service Call
    Log Web service call to the workflow history list
    Call [%Variable: ServiceURL%] HTTP web service with request (ResponseContent to Variable: responseContent |ResponseHeaders to Variable: responseHeaders |ResponseStatusCode to Variable: responseCode )
    Transition to stage
    Go to Process Web Service Response
    Stage:Process Web Service Response
    Log Process web service response to the workflow history list
    Get d/results from Variable: responseContent (Output to Variable: List )
    Count Items in Variable: List (Output to Variable: TotalListItem )
    Log Variable: TotalListItem to the workflow history list
    Set Variable: Index to 0
    Loop: Loop task items
    The contents of this loop will run Variable: TotalListItem times
    Get d/results([%Variable: Index%]) from Variable: responseContent (Output to Variable: CurrentItem )
    Get Title from Variable: CurrentItem (Output to Variable: title )
    Log Variable: title to the workflow history list
    Calculate Variable: Index plus 1 (Output to Variable: IncrementCounter )
    Set Variable: Index to Variable: IncrementCounter
    Set Workflow Status to Finished
    Transition to stage
    Go to Workflow Finished

    Stage:Workflow Finished
    Log Workflow finished to the workflow history list
    Transition to stage
    Go to End of Workflow

    any help will be appreciated.

    Regards

    Vidya

    Friday, March 31, 2017 7:12 AM

All replies