Hi everyone, Happy Friday!
I've been reading this post on Trigger Conditions:
I have a flow where I would like a trigger condition where it is one of 4 different triggers. I have 4 fields in my SharePoint list that could update, so I have created 4 dummy fields that update when a change is made.
So I would like my trigger condition to be this:
if field 1 is not equal to dummy field 1
or
if field 2 is not equal to dummy field 2
or
if field 3 is not equal to dummy field 3
or
if field 4 is not equal to dummy field 4
The syntax is kicking me to the curb, and if anyone can lend a hand that would be great.
Here is my actual flow for clarity.
Solved! Go to Solution.
Hi @smorley,
You should be able to use this syntax. Replace the hard coded values 1,2,3 and 4 by your dummy fields.
@or(not(equals(triggerOutputs()?['body/field1'], 1)))
@or(not(equals(triggerOutputs()?['body/field2'], 2)))
@or(not(equals(triggerOutputs()?['body/field3'], 3)))
@or(not(equals(triggerOutputs()?['body/field4'], 4)))
Hi @smorley,
You should be able to use this syntax. Replace the hard coded values 1,2,3 and 4 by your dummy fields.
@or(not(equals(triggerOutputs()?['body/field1'], 1)))
@or(not(equals(triggerOutputs()?['body/field2'], 2)))
@or(not(equals(triggerOutputs()?['body/field3'], 3)))
@or(not(equals(triggerOutputs()?['body/field4'], 4)))
Thanks @Expiscornovus - I was trying too hard with the syntax, trying to get it on one line. Although I may have not explained it right.
Let me try again.
Looking at my flow.
Trigger the flow:
if Unit name doesn't equal workflow unit name or Med Year doesn't equal workflow med year
I would like it to evaluate both at the same time.
@Expiscornovus syntax is good now, but the flow still runs twice. Once when I make the change and it goes through the workflow and updates my list item, and then the second time where there were no changes.
Hi @smorley
A possible workaround could be to add a boolean field (with a default value of false) to your list which. Set that boolean to true when your change the item for the first time in your flow. And add a boolean equals false expression to your trigger conditions. That could prevent your flow from triggering twice.
The first Microsoft-sponsored Power Platform Conference is coming in September. 100+ speakers, 150+ sessions, and what's new and next for Power Platform.
Announcing a new way to share your feedback with the Power Automate Team.
Learn to digitize and optimize business processes and connect all your applications to share data in real time.
User | Count |
---|---|
76 | |
27 | |
18 | |
16 | |
15 |
User | Count |
---|---|
138 | |
45 | |
34 | |
32 | |
29 |