Is there a way to build a json array in a SharePoint designer workflow?

I'm trying to update a multi-value lookup field in a SharePoint 2013 list from a SharePoint designer workflow using the 'Call HTTP Web Service' action.

Here's how the field looks when querying a list item with two values:


I'm using nested dictionaries to create the json structure for the POST request within SharePoint Designer but I'm not sure how to create a JSON array as needed by the "results" field.

I'm reading the "Assigned to" field from another list into a workflow variable typed as "Lookup Ids, comma delimited".

I then create a dictionary with an item "results" and the value set to my comma delimited lookup ids variable.

The json this produces is:


I get the following error when executing the query:

An unexpected 'PrimitiveValue' node was found when reading from the JSON reader. A 'StartArray' node was expected.

I think that's because the query should be:


Can anybody help me achieve that in SharePoint designer or suggest a better alternative?

The reason I'm using the web service is that I'm trying to create a workflow that loops through all of a list's items updating values when changes are made in another list.

May 27th, 2015 2:21pm


According to your description, my understanding is that you want to build a array for the Json format result data when using workflow call web service.

In the workflow, I suggest you can count Items in the Results and output to a variable, then you can use Loop action to loop through the results with the count.

Here is a detailed article for your reference:



Best Regards

Free Windows Admin Tool Kit Click here and download it now
May 28th, 2015 9:50pm

Thanks for the reply Jerry, I can read values without any problem but the issue comes when trying to write values back through the web service. I'm having trouble finding a way to create a query in sharepoint designer 2013 that is formatted like this:


For example if I build a string for the array of results, designer produces the following query:


Which results in an error.
June 26th, 2015 10:42am

Hi Snehpetsa, did you ever manage to figure this out?   I've also hit this issue in that I have a WebAPI POST which takes a json array as a parameter, however I haven't been able to get SharePoint Designer to correctly generate the syntax.


Free Windows Admin Tool Kit Click here and download it now
July 27th, 2015 5:48pm

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics