cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
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
Highlighted
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 II
Super User II

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

Highlighted
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

Highlighted
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

Super User Program Update

Three Super User rank tiers have been launched!

firstImage

Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

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!

Top Solution Authors
Users online (6,608)