I have a simple use case that's turning out to be much more complicated to "code" than I signed up for. Essentially, I'm creating a Purchase Order Request solution using a SharePoint list with versioning and content approval enabled.
The approval process kicks off using the "When an item is created or modified" SharePoint Connector trigger and makes use of the Approvals Connector to update the Content Approval Status according to the administrator's response to the Approvals Connector message. Once the admin selects Approve or Reject from the message, the flow then updates the item's Content Approval Status according to the response using Conditional Cases for Approve and Reject.
This all works fine and the Content Approval Status changes in the list item with the approver's comments, but because a "new" modification to the SharePoint item ensues by updating the Content Approval Status field, the original flow invokes a second flow, and hence another Approvals request for an item that's already been triaged and actioned on.
In order to get around this, I added a Condition at the beginning of the flow that checks whether or not the Content Approval Status field is already in an Approved or Rejected state and immediately terminates the recursive flow if it is. This seems to work, but also convolutes the logs with two flows per trigger. And when I add email notifications to the mix, multiple emails end up firing as a result.
Is there some built in mechanism that can be leveraged to avoid this duplicate flow behavior? I really wish there was a trigger for when an item is created and another for when an item is modified.
@ScottShearer , the Created field eventually updated. Thanks for your help!
Hi @Anonymous ,
Glad that your problem could be solved by @ScottShearer 's suggestion to add the trigger condition.
And for the Created Date field that you mentioned, I agree with @ScottShearer that you could wait for a while and refresh the page.
Also if your problem has solved, please go ahead and mark the post as solved by clicking “Accept as Solution” so that this thread will be marked for other users to easily identify!
Best Regards,
Alice
Community Support Team _ Alice Zhang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Best Regards,
Alice
Community Support Team _ Alice Zhang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
@Anonymous
I suspect that if you wait a while and refresh the screen the created dat/time will change form "a few seconds ago".
@ScottShearer , disregard the syntax issue, it's most likely because I'm a newbie to the expression language. After a few hours of troubleshooting and reading up on the syntax, I noticed that the apostrophes encapsulating my column name were off. You can't use "open/close" apostrophes, they have to be "straight" ones. I highlighted the difference below:
You had this in your guide: @equals(triggerBody()?[‘StopRun’],null)
This change was required for the interpreter to accept my syntax: @equals(triggerBody()?['StopRun'],null)
In any case, I ran a few flows and haven't seen any dupes, but noticed that the Created date is now constantly displaying as "A few seconds ago" instead of the actual creation date. Is that a known side effect of the trigger expression?
@ScottShearer , thanks for the info. I created the hidden column and added the expression, substituted with my custom column name, but the Flow Checker is throwing an error:
Trigger Condition Expression Error
@Anonymous
Here is a link to a blog post that I wrote that I believe will provide a solution to your issue.
WarrenBelz
146,524
Most Valuable Professional
RandyHayes
76,287
Super User 2024 Season 1
Pstork1
65,906
Most Valuable Professional