Hi,
I am trying to trigger a flow from a SharePoint list using the "When an item is created or modified" trigger. I am then using the Trigger Conditions option in the settings to restrict when the flow runs.
I have a 'Choice' column called "Submitted" in the list that allows either "Yes" or "No". I would like the flow to continue only when the value of the "Submitted" column equals "Yes".
I have tried a variety of options (and read many blogs!) but am not clear how to get the get the expression to work.
Any help much appreciated
(These are some of the ones I've tried
@equals(triggerOutputs()?['Submitted']?['value'],'Yes')
@equals(triggerOutputs()?['Submitted/Value'],'Yes')
@equals(triggerOutputs()?['Submitted']?['Value'],'Yes')
@contains(triggerOutputs()?['body/Submitted'],'Yes')
@equals(triggerOutputs()?['body/Submitted#Value'],'Yes')
@contains(triggerOutputs()?['body/Submitted#Value'],'Yes'))
@or(equals(triggerOutputs()?['body/MyField/Value'], 'YES'),equals(triggerOutputs()?['body/MyField/Value'], 'MAYBE'))
The format is basically taking an "equals" with the "triggerOutputs()", a "?", the field name off of the body and appending "Value" if it's a Choice or Lookup field, then a comma and the value you are looking for:
equals(triggerOutputs()?['body/MyField/Value'], 'YES')
and repeat this format for every choice you want the flow to trigger off of, with commas in-between those blocks, then encapsulate the whole thing with the
@or( .... )
Hello,
can you please advise how to use trigger conditions based on selection first OR second choice?
In total I have column with 4 predefined choices but I want to trigger automation only if first choice (YES) or second choice (MAYBE) is selected.
Thank you.
Thank you Bof that now works perfectly
In case anyone else has this problem after much wrangling I realised I had made an amendment in the SharePoint list which was not picked up in PowerAutomate so it could not find the trigger output.
Hi @Anonymous :
Pease try:
@equals(triggerOutputs()?['body/Submitted/Value'], 'Yes')
Best Regards,
Bof
Hi,
Sorry I thought I had found the solution but this also does not work
The expression I used was @equals(triggerOutputs()?['body/FurtherInfo/Value'],'Yes')
I found this by putting a Condition in the flow immediately after the trigger and then started to enter the expression adding the dynamic field I wanted. It then populated the expression for me!
WarrenBelz
146,731
Most Valuable Professional
RandyHayes
76,287
Super User 2024 Season 1
Pstork1
66,075
Most Valuable Professional