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
Power Automate News & Announcements

Power Automate News & Announcements

Keep up to date with current events and community announcements in the Power Automate community.

Community Calls Conversations

Community Calls Conversations

A great place where you can stay up to date with community calls and interact with the speakers.

Power Automate Community Blog

Power Automate Community Blog

Check out the latest Community Blog from the community!

Top Solution Authors
Users online (2,077)