cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
RamiAlouta
Level: Power Up

If condition in flow with multiple "or".

Hello Flowers,

 

I am trying to write an if condition that should be true if it means 1 of 15 different answers.

 

My research showed me that it should look something like this yet I am not sure that this is working! any help?

 

@or(equals(triggerBody()?['feature']?['attributes']?['inspector'], 'user1'), or(equals(triggerBody()?['feature']?['attributes']?['inspector'], 'user2'), or(equals(triggerBody()?['feature']?['attributes']?['inspector'], 'user3'))))

1 ACCEPTED SOLUTION

Accepted Solutions
Community Support Team
Community Support Team

Re: If condition in flow with multiple "or".

Hi @RamiAlouta,

 

I assume that you would like to combine multiple if conditions within one statement.

 

Please check the following code which will return corresponding value based on the input value:

if(equals(triggerBody()?['Title'],'test1'),'test1',if(equals(triggerBody()?['Title'],'test2'),'test2',if(equals(triggerBody()?['Title'],'test3'),'test3','test4')))

 1.PNG

Please take it for a reference and try it on your side.

 

Best regards,

Mabel

 

Community Support Team _ Mabel Mao
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

2 REPLIES 2
Community Support Team
Community Support Team

Re: If condition in flow with multiple "or".

Hi @RamiAlouta,

 

I assume that you would like to combine multiple if conditions within one statement.

 

Please check the following code which will return corresponding value based on the input value:

if(equals(triggerBody()?['Title'],'test1'),'test1',if(equals(triggerBody()?['Title'],'test2'),'test2',if(equals(triggerBody()?['Title'],'test3'),'test3','test4')))

 1.PNG

Please take it for a reference and try it on your side.

 

Best regards,

Mabel

 

Community Support Team _ Mabel Mao
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

RamiAlouta
Level: Power Up

Re: If condition in flow with multiple "or".

Some small edits since I am using the survey123 connector!

 

It should look something like this:

 

@if(equals(triggerBody()?['feature']?['attributes']?['field_0'], 'user1'), true,if(equals(triggerBody()?['feature']?['attributes']?['field_0'], 'user2'), true, false))

Helpful resources

Announcements
thirdimage

Power Automate Community User Group Member Badge

Fill out a quick form to claim your user group badge now!

firstImage

Incoming: New and improved badges!

We've given our badges an overhaul and also added some brand new ones!

fifthimage

Microsoft Learn

Learn how to build the business apps that you need.

sixthImage

Power Platform World Tour

Find out where you can attend!

seventhimage

Webinars & Video Gallery

Watch & learn from the Power Automate Community Video Gallery!

Top Kudoed Authors (Last 30 Days)
Users online (5,252)