โ11-04-2021 02:55 PM
Hi, I'm trying to delete all items from a SharePoint list, but keep getting this error:
412 Precondition Failed: {"odata.error":{"code":"-1, Microsoft.SharePoint.Client.ClientServiceException","message":{"lang":"en-US","value":"The request ETag value '' does not match the object's ETag value '\"d83ffc2b-6c9f-4db1-b0b1-1c1bfcfd4c16,1\"'."}}}
I found thet the headers needed to include:
X-HTTP-Method: Merge
If-Match: ETag
I first call:
_api/web/lists/getByTitle('B360__Issues')/items
Then in a loop
_api/Web/Lists/getByTitle('B360__Issues')/getItemById(ID from step 2)
โ11-04-2021 04:43 PM
here's the example recipe: https://app.workato.com/recipes/1833010?st=3f1613
โ11-05-2021 08:14 AM
Got it Sophat, thanks.
I really need to get into Workato more.
In the do untill loop you just drag the datapil from the previous step....
It's working now!
What I want to do is undex the ID column where I store the Autodesk Issue ID's.
Then create a list item.
If that fails (the record already exists), then update that record.
This will prevent having to search the list if a record exists.