-
Notifications
You must be signed in to change notification settings - Fork 990
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
validateUpdateListItem causing PowerAutomate flow to trigger #7424
Comments
Thank you for reporting this issue. We will be triaging your incoming issue as soon as possible. |
Any Update on this? |
I just bumped into the same issue when I didn't set the editor field. This then results in the account used by the flow to become the new editor/Modified By. I found however that when I set the Editor field this behaviour changes. In my case I'm setting the editor to the owner of the item/document (so in effect not making a change), and now my flows are not triggered (as expected!) and my version history in SharePoint not being updated. So it look like the SystemUpdate does work however the Editor needs to be set. Looking at the above example. Editor is being set to the following value: This should be a claim rather than an email address and then it should work. |
Hi @Pieter-Veenstra can you elaborate on what you mean by this should be a claim rather than an email address please? DO you mean it should be: [{'Key':'i:0#.f|membership|username@tenant.onmicrosoft.com'}] |
We are seeing the same issue.
Modified field value is set using formatDateTime(triggerOutputs()?['body/Modified'],'yyyy-MM-dd hh:mm:ss') Flow keeps retriggering until it is saved with a Terminate action before the Send an HTTP request to SharePoint action. Does anybody have an example of this technique for silently updating without retriggering currently working? Is there an alternative technique we should pursue? |
We are now able to use the validateUpdateListItem endpoint to update a list item without retriggering the flow (i.e., found and resolved the problem). |
I have tried using the validateUpdateListItem endpoint by setting the Editor and Modified fields, along with my own field, but the flow still ends up in an infinite loop. My entire body looks as follows: {
"formValues": [
{
"FieldName": "CustomConcatField",
"FieldValue": "@{join(body('Select'),';')}"
},
{
"FieldName": "Modified",
"FieldValue": "@{addMinutes(triggerOutputs()?['body/Modified'], 120, 'yyyy-MM-dd HH:mm:ss')}"
},
{
"FieldName": "Editor",
"FieldValue": "[{'Key':'@{triggerOutputs()?['body/Editor/Claims']}'}]"
}
],
"bNewDocumentUpdate": true
} I have verified the Modified date field and that is set to the correct value. Within the SharePoint UI it also state the same value after the update as before the update. Interestingly enough I do not get a new version when examining the version history and as mentioned the Modified and Editor fields are kept the same, but still my flow re-triggers. |
Target SharePoint environment
SharePoint Online
What SharePoint development model, framework, SDK or API is this about?
SharePoint REST API
Developer environment
Windows
What browser(s) / client(s) have you tested
Additional environment details
Describe the bug / error
Currently I have a very simple PowerAutomate flow that is triggered on item creation or modification. The flow is associated with a very basic list containing just a title column for testing purposes. Using the 'validateUpdateListItem' endpoint along with the SharePoint HTTP action I am trying to update the title.
When testing this the list item is updated as expected, and the version does not increment, however the PowerAutomate flow is triggered again as if the list item has been modified.
When inspecting the body of the trigger when the flow is triggered I can see that the modified date is an hour behind that of the actual modification time, as an example:
Even when converting the date to UTC using a PowerAutomate expression in the body of the HTTP Post action I am finding that the flow is being triggered multiple times, as an example:
Currently the HTTP Post Action is configured as so:
Endpoint
https://tenant.sharepoint.com/sites/sitecol/_api/web/GetList('/sites/sitecol/Lists/mylist')/items(22)/ValidateUpdateListItem()
Method
Post
Headers
{ "Accept": "application/json;odata=nometadata", "Content-Type": "application/json;odata=nometadata" }
Body
Steps to reproduce
/_api/web/GetList('/sites/validateupdatelistitem/Lists/ValidateUpdate')/items(@{triggerOutputs()?['body/ID']})/ValidateUpdateListItem()
{ "Accept": "application/json;odata=nometadata", "Content-Type": "application/json;odata=nometadata" }
{"formValues": [ { "FieldName": "Modified", "FieldValue": "@{convertFromUtc(triggerBody()?['Modified'], 'GMT Standard Time', 'yyyy-MM-dd HH:mm:ss')}" }, {"FieldName":"Editor", "FieldValue":"[{'Key':'@{triggerOutputs()?['body/Editor/Email']}'}]"}, {"FieldName":"Title","FieldValue":"UpdatedTitle"} ], "bNewDocumentUpdate":true }
Expected behavior
I would expect the list item title to be updated but that the flow would then not run again, this is a tried and practiced method I have used before and it has only recently started happening so I am not sure if this is a bug with PowerAutomate or a change with how the 'validateUpdateListItem' endpoint works.
The text was updated successfully, but these errors were encountered: