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
Microsoft 365 Conference – December 6-8, 2022

Microsoft 365 Conference – December 6-8, 2022

Join us in Las Vegas to experience community, incredible learning opportunities, and connections that will help grow skills, know-how, and more.

Difinity Conference 2022

Difinity Conference 2022

Register today for two amazing days of learning, featuring intensive learning sessions across multiple tracks, led by engaging and dynamic experts.

European SharePoint Conference

European SharePoint Conference

The European SharePoint Conference returns live and in-person November 28-December 1 with 4 Microsoft Keynotes, 9 Tutorials, and 120 Sessions.

Users online (5,134)