cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Sonu123
Frequent Visitor

Trigger condition for choice field and single line text

I have a SharePoint task list with a column called " Technology", it is a choice field and I have another column i.e. " Previous Technology", which is a single line text.

I want a trigger condition in the Power Automate when the Technology value is not equal to the Previous technology value. It triggers: when a file is created or modified.

For example, if the technology value is Power Automate and previous technology is also power automate, then the flow will not trigger, else it will trigger.

And I have tried the below trigger condition

@not(equals(triggerOutputs()?['body/Technology'],triggerOutputs()?['body/PreviousTechnology']))

I don't receive any error, but flow ran when technology = previous technology

trigger condition.png

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Any help would be much appreciated!

Regards

Sonu

1 ACCEPTED SOLUTION

Accepted Solutions
v-LilyW-msft
Community Support
Community Support

Hi @Sonu123 

If you want to reference the user’s selection on the Choice Field, you have to use the Choice Field's “Value”,the value is a text.

Please change the trigger condition to the following and try again.

@not(equals(triggerOutputs()?['body/Technology/Value'], triggerOutputs()?['body/PreviousTechnology']))

 

Hope the content above may help you.

Best Regards

If my solution 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
CFernandes
Super User
Super User

Hey @Sonu123 

 

You can combine trigger conditions  - Have a look at - https://tomriha.com/a-simple-way-to-create-a-trigger-condition-in-power-automate/ 

 

If this reply has answered your question or solved your issue, please mark this question as answered. Answered questions helps users in the future who may have the same issue or question quickly find a resolution via search. If you liked my response, please consider giving it a thumbs up. THANKS!

 

P.S. take a look at my blog here and like & subscribe to my YouTube Channel thanks.

v-LilyW-msft
Community Support
Community Support

Hi @Sonu123 

If you want to reference the user’s selection on the Choice Field, you have to use the Choice Field's “Value”,the value is a text.

Please change the trigger condition to the following and try again.

@not(equals(triggerOutputs()?['body/Technology/Value'], triggerOutputs()?['body/PreviousTechnology']))

 

Hope the content above may help you.

Best Regards

If my solution helps, then please consider Accept it as the solution to help the other members find it more quickly.

 

View solution in original post

Thank you for your reply, I have tried your formula i.e @not(equals(triggerOutputs()?['body/Technology/Value'], triggerOutputs()?['body/PreviousTechnology']))

 Still, I am getting the same infinity loop error after adding the above trigger condition

trigger error.png

 

Here you can see my flow

flow error.png

 

 

Thanks in advance

Hi @Sonu123 

About how to avoid infinite trigger loop in flow,you can refer to:

https://tomriha.com/how-to-avoid-infinite-trigger-loop-in-power-automate/

Best Regards.

 

Helpful resources

Announcements
UG GA Amplification 768x460.png

Launching new user group features

Learn how to create your own user groups today!

Community Connections 768x460.jpg

Community & How To Videos

Check out the new Power Platform Community Connections gallery!

M365 768x460.jpg

Microsoft 365 Collaboration Conference | December 7–9, 2021

Join us, in-person, December 7–9 in Las Vegas, for the largest gathering of the Microsoft community in the world.

Users online (2,748)