This blog will help to update a list item using an HTTP Web Service in the SharePoint Designer Workflow.
Create a new Dictionary Variable and name it as “Header” in the “Build” action to store the headers for the Post HTTP call.
Then, click on “this” in the “Build” action, it will show the dictionary variable, while add in the “Header” dictionary variable, it will show another popup to add the dictionary item in it.
We have to add Headers for the Post HTTP call by adding the headers as a dictionary item in the Dictionary. To use the Post HTTP call to update a list item, add the below headers.
Create a new variable and enter the List
Note: Search as variable and enter, it will “Set Workflow Variable” action, then click on “Workflow Variable” and create a new variable or choose “Set Workflow Variable” from “Action”.
Create a new variable to form the HTTP rest API to update data in a SharePoint list.
Note: In the rest API, have to give valid item ID to update the list item.
Create a dictionary variable and name it as “metadata” and add below data as Dictionary item.
Hit the below URL in the browser, then search it for “ListItemEntityTypeFullName”, then copy the ListItemEntityTypeFullName value for the “type” Dictionary item.
Create a dictionary variable and name it as “Parameters” and add below data as Dictionary item.
|__metadata||Dictionary||/** Select the Workflow Varibale metadata **/|
Then add internal name of the field, its respected field type, and its updated item value in the Dictionary item to update item in the SharePoint list.
Once the parameters are stored in a workflow variable, then search “HTTP” and click enter it will show “HTTP Call” action in the stage.
Select the “HTTP Call” action and click “Advanced Properties” and choose Workflow Variable which is stored Rest API call for Address, “HTTP POST” for Request Type, Workflow Variable which is stored Headers for Request Headers, Workflow Variable which is stored Parameters for Request Content and create a new variable for Request Content and Response Status Code.
To check the “HTTP Call” is executed, log the workflow variable which assigned for Response Status Code.
In the “Transition to Stage”, choose “Go to a Stage” and select “End of Workflow”, then publish the workflow. I hope, you have learned how to update a list item using SharePoint Designer workflow from the blog.