cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
mtagliaferri
Resolver I
Resolver I

Trigger for SharePoint List When an Item is Modified

I have come to a complete stop trying to figure out my issue, I am trying to avoid triggering a flow unnecessary or this going in a loop when editing a specific column in a SharePoint list, I am looking at the setting option (three dots) on When an item or a file is modified in a SharePoint list, any attempt I have been testing so far has failed on the trigger conditions.

I have various cases as following:

  • If a specific field in Not Empty (changes from blank to a value, this can be a text or a number column in the SharePoint library) when the user edits the list and enter a value that will trigger the flow.
  • As per above but a Date Column (in SP2010 I used filed not equal to 01/01/1900).
  •  If a specific check box it ticked (therefore changes the status to Yes) will trigger the workflow (The column setting is choice/Checkbox and has only one option to check).

Any suggestions?

 

Capture.PNG

1 ACCEPTED SOLUTION

Accepted Solutions
mtagliaferri
Resolver I
Resolver I

I seem to have found the reason why the flow did not trigger, this was due to the fact that the field is not a Yes/No column in the SharePoint library.

@equals(triggerBody()?['CheckField'],true)

View solution in original post

6 REPLIES 6
fchopo
Super User
Super User

Hello @mtagliaferri 

You could use the following expressions:

 

1. Check text field is not empty:

not(empty(triggerBody()?['TextField1']))

2. Check Date field is not empty:

not(empty(triggerBody()?['DateField1']))

3. Check Choice field is checked (true):

equals(triggerBody()?['CheckField'],true)

 

So we can put the all 3 together:

@or(or(not(empty(triggerBody()?['TextField1'])),not(empty(triggerBody()?['DateField1']))),equals(triggerBody()?['CheckField'],true))

 

Hope it helps!

Ferran

Did I answer your question? Please consider to mark my post as a solution to help others.
Proud to be a Flownaut!

Hi @fchopo thanks for getting back, I have applied your suggestion but  it appears that it stops the flow to trigger also when it meets the criteria.

With no settings applied every time I edit any columns in the SharePoint list the flow will trigger, I then applied the setting as following:

@equals(triggerBody()?['RTW Completed'],true) 

 

As soon as this is entered the flow does not trigger not even when the RTW Completed check box is ticked.

Capture.PNG

mtagliaferri
Resolver I
Resolver I

@fchopo I think I am getting somehow closer, or at least I hope:

The above example is using the trigger When an item is created or modified, I have used a different trigger which is When an item or file is modified

I have tested it with :

not(empty(triggerBody()?['TextField1']))

and this works, however does not work with:

not(empty(triggerBody()?['DateField1']))

and 

equals(triggerBody()?['CheckField'],true)

 

Hello @mtagliaferri 

Could you try with the following expression?

@equals(triggerBody()?['RTW Completed']?['Value'],true) 

Regards,

Ferran

Did I answer your question? Please consider to mark my post as a solution to help others.
Proud to be a Flownaut!

@fchopo 

@equals(triggerBody()?['RTW Completed']?['Value'],true) 

does not seem to work, I have also tried 

@equals(triggerBody()?['RTW Completed']?['Yes'],true) 

but neithes this works

mtagliaferri
Resolver I
Resolver I

I seem to have found the reason why the flow did not trigger, this was due to the fact that the field is not a Yes/No column in the SharePoint library.

@equals(triggerBody()?['CheckField'],true)

Helpful resources

Announcements
Power Automate News & Announcements

Power Automate News & Announcements

Keep up to date with current events and community announcements in the Power Automate community.

Microsoft 365 Conference – December 6-8, 2022

Microsoft 365 Conference – December 6-8, 2022

Join us in Las Vegas to experience community, incredible learning opportunities, and connections that will help grow skills, know-how, and more.

Power Automate Community Blog

Power Automate Community Blog

Check out the latest Community Blog from the community!

Users online (3,044)