cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Advocate III
Advocate III

How do you use AND?

Hey,

 

I can't seem to get the AND to work in some conditional logic. It keep giving me an expression error for the following snippet:

 

@and(not(contains(triggerBody()?['Subject'], 'RE:')), not(equals(triggerBody()?['From'], 'someone@anywhere.com')))

 

Any idea?

4 REPLIES 4
Highlighted
Microsoft
Microsoft

Re: How do you use AND?

Hi stvcdms,

What did you add the snippet in?

You could check if there is logic error in the snippet.

And you could type the snippet manually.

More reference:

And, Or, and Not functions in PowerApps.

https://powerapps.microsoft.com/en-us/tutorials/function-logicals/

Best regards,

Sara Fan

 

Highlighted
Advocate III
Advocate III

Re: How do you use AND?

Hello,

 

Since it won't make a compound conditional for me, what I added is in bold.

 

@and(not(contains(triggerBody()?['Subject'], 'RE:')), not(equals(triggerBody()?['From'], 'someone@anywhere.com')))

 

Perhaps also interesting is now the condition will not work period, even if it's reverted the condition will get an evaluation failure, which I think is a bug.

 

Steve

Highlighted
Kudo Kingpin
Kudo Kingpin

Re: How do you use AND?

@stvcdms Please note the following thread reports problems when editing Conditions in Advanced Mode. However, it used to work on May-June 2016 timeframe

 

https://powerusers.microsoft.com/t5/Flow-Forum/Flow-Conditions-Instantly-Fail-In-Advanced-Mode/m-p/5...

Highlighted
Power Automate
Power Automate

Re: How do you use AND?

@stvcdms : It seems like you are using the "On new email" trigger, you could in the advanced mode on the trigger, fitler emails by subject and sender to achieve the scenario you are trying to articulate using the expression. In the meanwhile, we will investigate on our side why exactly your expression seems to fail.

 

Sunay

Helpful resources

Announcements
secondImage

August 2020 CYST Winners!

Check out the winners of the recent 'Can You Solve These?' community challenge!

thirdImage

Experience what's new for Power Automate

Join us for an in-depth look at the new Power Automate features and capabilities at the free Microsoft Business Applications Launch Event.

firstImage

Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

thirdimage

Power Automate Community User Group Member Badge

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

Top Solution Authors
Top Kudoed Authors
Users online (5,219)