cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
cybercy
Frequent Visitor

Multiple conditions in expression not working - syntax issue

Hi Everyone,

 

I'm struggling with an expression, its not working, and I'm not sure about the syntax at all 😞

 

if(not(equals(triggerBody()?['ListIf_EgyuttTartamEgyeb'], '105 óra','70 óra','140 óra','160 óra')),'ListIf_EgyuttTartamEgyeb', ' ')

 

What I'm trying to do:

if the field 'ListIf_EgyuttTartamEgyeb' value is NOT ('105 óra' OR '70 óra' OR  '140 óra' OR '160 óra'), then the true condition of the IF should be the value of the field 'ListIf_EgyuttTartamEgyeb', the false should be just an empty character.

 

Can it be done? Thanks for your help

1 ACCEPTED SOLUTION

Accepted Solutions
Community Support
Community Support

Re: Multiple conditions in expression not working - syntax issue

Hi @cybercy,

 

Please have a test on the following expression:

if(not(or(equals(triggerBody()?['ListIf_EgyuttTartamEgyeb'],'105 óra'),equals(triggerBody()?['ListIf_EgyuttTartamEgyeb'],'70 óra'),equals(triggerBody()?['ListIf_EgyuttTartamEgyeb'],'140 óra'),equals(triggerBody()?['ListIf_EgyuttTartamEgyeb'],'160 óra'))),triggerBody()?['ListIf_EgyuttTartamEgyeb'],'')

The structure is - if(not(or(field is equal to A, field is equal to B, field is equal to C, field is equal to D)), 'field', '')

Hope it helps.

Best Regards,
Community Support Team _ Lin Tu
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

3 REPLIES 3
Super User
Super User

Re: Multiple conditions in expression not working - syntax issue

Please see the following expression

 

@or(equals(triggerBody()?['ANSI_x0020_Status']?['Value'],'Rejected by Procurement'), equals(triggerBody()?['ANSI_x0020_Status']?['value'],'Completed'))

 

This expression evaluates true if either of them are correct, you will need to add a not.

 

basically you nee dto split them out into seperate conditions for each value and then use a not as well

Community Support
Community Support

Re: Multiple conditions in expression not working - syntax issue

Hi @cybercy,

 

Please have a test on the following expression:

if(not(or(equals(triggerBody()?['ListIf_EgyuttTartamEgyeb'],'105 óra'),equals(triggerBody()?['ListIf_EgyuttTartamEgyeb'],'70 óra'),equals(triggerBody()?['ListIf_EgyuttTartamEgyeb'],'140 óra'),equals(triggerBody()?['ListIf_EgyuttTartamEgyeb'],'160 óra'))),triggerBody()?['ListIf_EgyuttTartamEgyeb'],'')

The structure is - if(not(or(field is equal to A, field is equal to B, field is equal to C, field is equal to D)), 'field', '')

Hope it helps.

Best Regards,
Community Support Team _ Lin Tu
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

cybercy
Frequent Visitor

Re: Multiple conditions in expression not working - syntax issue

Thanks a lot for the syntax and for the explanation. It's perfectly working now!

Helpful resources

Announcements
firstImage

New Ranks and Rank Icons released on April 21!

The time has come: We are finally able to share more details on the brand-new ranks coming to the Power Automate Community!

firstImage

Now Live: Power Virtual Agents Community!

We are excited to announce the launch of Power Virtual Agents Community. Check it out now!

firstImage

New & Improved Power Automate Community Cookbook

We've updated and improved the layout and uploading format of the Power Automate Cookbook!

thirdimage

Power Automate Community User Group Member Badge

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

sixthImage

Community Summit North America

The top training and networking event across the globe for Microsoft Business Applications

Top Solution Authors
Top Kudoed Authors
Users online (6,307)