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 Platform Conf 2022 768x460.jpg

Join us for Microsoft Power Platform Conference

The first Microsoft-sponsored Power Platform Conference is coming in September. 100+ speakers, 150+ sessions, and what's new and next for Power Platform.

New Ideas Forum MPA.jpg

A new place to submit your Ideas for Power Automate

Announcing a new way to share your feedback with the Power Automate Team.

MPA Virtual Workshop Carousel 768x460.png

Register for a Free Workshop

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

MPA Licensing.jpg

Ask your licensing questions at the Power Automate AMA!

Join Priya Kodukula and the licensing team, super users and MVPs to find answers to your questions on Power Automate licensing.

Users online (1,698)