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:
Any suggestions?
Solved! Go to Solution.
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)
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
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.
@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
@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
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)
User | Count |
---|---|
89 | |
37 | |
26 | |
13 | |
12 |
User | Count |
---|---|
128 | |
53 | |
38 | |
26 | |
21 |