cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Advocate I
Advocate I

Trigger Condition expression for Created Documents vs Modified Documents

Several months ago, I had to create several workflows that were initially planned to be for whenever a SharePoint document was created and/or modified. It worked well, but now there has been a change in the process and I need to adjust the workflow to only be triggered when the document is created.

 

I know that the Flow can be recreated using the SharePoint "When a file is created (properties only)", but with issues with using "My Clipboard", recreating these 20 workflows will be very time consuming. I have been able to add in the condition that compares the Created to the Modified values, I'm hoping that there is a way to use Trigger Conditions so that the Modified documents don't count against my Flow Runs. I've used Trigger Conditions on another Flow, but it was because I was able to find the expression that fit exactly what I needed. Does anyone have the expression for stopping documents that are modified?

 

Below is how I've been able to get the Flow to continue to work without recreating the Flow from scratch, but it does count against runs of the Flow.

1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted
Community Support
Community Support

Re: Trigger Condition expression for Created Documents vs Modified Documents

 

Hi @mhines ,

 

Please use this expression:

 

@equals(triggerBody()?['Created'], triggerBody()?['Modified'])

 

 

Best Regards, 

Community Support Team _ Barry
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

4 REPLIES 4
Highlighted
Dual Super User III
Dual Super User III

Re: Trigger Condition expression for Created Documents vs Modified Documents


@mhines wrote:

I have been able to add in the condition that compares the Created to the Modified values, I'm hoping that there is a way to use Trigger Conditions so that the Modified documents don't count against my Flow Runs. I've used Trigger Conditions on another Flow, but it was because I was able to find the expression that fit exactly what I needed. Does anyone have the expression for stopping documents that are modified?

Yes we can!

Did you try to compare triggerBody()?['Created'] and triggerBody()?['Modified'] by means of equal() function in your Conditional trigger?

 

Hope this helps



Each time you click on any of our inspiring answers 'Thumb up' icon...
...an ewok scapes from the stormtroopers.

Be grateful, Thumbs up! Save the Galaxy for free!


Escribo sobre Power Automate en:
https://medium.com/anyone-can-automate/

Proud to be a Flownaut!



Highlighted
Advocate I
Advocate I

Re: Trigger Condition expression for Created Documents vs Modified Documents

I thought I had tried, but I keep on getting messages that my expression is invalid. I've tried so many variations that I'm pretty lost now at what's next.

Annotation 2020-02-26 1435267.pngAnnotation 2020-02-26 143526.png

Highlighted
Community Support
Community Support

Re: Trigger Condition expression for Created Documents vs Modified Documents

 

Hi @mhines ,

 

Please use this expression:

 

@equals(triggerBody()?['Created'], triggerBody()?['Modified'])

 

 

Best Regards, 

Community Support Team _ Barry
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

Highlighted
Advocate I
Advocate I

Re: Trigger Condition expression for Created Documents vs Modified Documents

Thank you so much. This appears to have done the trick!

Helpful resources

Announcements
firstImage

Super User Program Update

Three Super User rank tiers have been launched!

firstImage

Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

firstImage

New & Improved Power Automate Community Cookbook

We've updated and improved the layout and uploading format of the Power Automate Cookbook!

thirdimage

Power Automate Community User Group Member Badge

Fill out a quick form to claim your user group badge now!

Top Solution Authors
Users online (7,421)