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
Highlighted
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

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
Community Conference

Power Platform Community Conference

Check out the on demand sessions that are available now!

Power Platform ISV Studio

Power Platform ISV Studio

ISV Studio is designed to become the go-to Power Platform destination for ISV’s to monitor & manage published applications.

Tech Marathon

Maratón de Soluciones de Negocio Microsoft

Una semana de contenido con +100 sesiones educativas, consultorios, +10 workshops Premium, Hackaton, EXPO, Networking Hall y mucho más!

Users online (6,559)