cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Ronja
Regular Visitor

If Equals Or Function for Variables

Hi Power Automate Community, 

 

I am trying to set a variable to a specific country, to later dynamically use this for different folders etc. 
One thing I can't get to work is to set the variable to the country from the trigger, except for country A and country B I want the variable to be "United AB". 

Any help would be very much appreciated! 

 

if(equals(triggerOutputs()?['body/Country'],'Country A', 'United AB'), if(equals(triggerOutputs()?['body/Country'], 'Country B', 'United AB'), triggerOutputs()?['body/Country']))

 

 

1 ACCEPTED SOLUTION

Accepted Solutions

Hi @Ronja 

 

Thanks for your reply.

 

Try the below

 
if(or(equals(triggerOutputs()?['body/Country'],'Country A'),equals(triggerOutputs()?['body/Country'],'Country B')),'United AB',triggerOutputs()?['body/Country'])


Did I answer your question? Mark my post as a solution!

If you liked my response, please consider giving it a thumbs up


Proud to be a Flownaut!

Learn more from my blog
Power Automate Video Tutorials

View solution in original post

4 REPLIES 4
abm
Super User
Super User

Hi @Ronja 

 

Not fully understand about this. So IF the country is NOT Country A or Country B then set to 'United AB'. Is that you after?



Did I answer your question? Mark my post as a solution!

If you liked my response, please consider giving it a thumbs up


Proud to be a Flownaut!

Learn more from my blog
Power Automate Video Tutorials
Ronja
Regular Visitor

Hi @abm actually the opposite 🙂 So if it's country A or Country B then set the variable to United AB, otherwise use the existing country. 
I hope this makes it a bit clearer. 😌

Thank you!!

Hi @Ronja 

 

Thanks for your reply.

 

Try the below

 
if(or(equals(triggerOutputs()?['body/Country'],'Country A'),equals(triggerOutputs()?['body/Country'],'Country B')),'United AB',triggerOutputs()?['body/Country'])


Did I answer your question? Mark my post as a solution!

If you liked my response, please consider giving it a thumbs up


Proud to be a Flownaut!

Learn more from my blog
Power Automate Video Tutorials
Ronja
Regular Visitor

@abm perfect, thank you so much! 🙂

 

Helpful resources

Announcements
 WHAT’S NEXT AT MICROSOFT IGNITE 2022

WHAT’S NEXT AT MICROSOFT IGNITE 2022

Explore the latest innovations, learn from product experts and partners, level up your skillset, and create connections from around the world.

Register for a Free Workshop.png

Register for a Free Workshop

Learn to digitize and optimize business processes and connect all your applications to share data in real time.

Users online (1,584)