cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
New Member

‘OR’ Statements conditions are not working exactly

I have a Flow that applies to all emails coming from a specific sender. (step 1)

I then added condition where, it should look at the Subject and filter based on keywords (multiple keywords using 'Or' Statement)  (step 2)

If above condition is met, checks for another condition that looks for a specific keyword in the Body of the email (step 3)

If condition is met again, does another check for a specific phrase on the Subject line. (step 4)

if condition is still met, then sends an email. (step 5)

 

now everything seems to be working all the way to sending the emails, except it is actually not doing the filtering at the first condition using the 'Or' Statement (step 2)

 

so basically

step 1 - it checks for specific sender email

step 2 - skips

step 3 - checks for condition that looks for a specific keyword in the Body of the email

step 4 - check for a specific phrase on the Subject line.

step 5 - sends an email.

 

i dont understand why the filtering on step 2 is not applying at all

 

alertflow.PNG

3 REPLIES 3
Highlighted
Community Support
Community Support

Re: ‘OR’ Statements conditions are not working exactly

Hi @svcMon ,

 

From your description, it seems that the Condition 8 will be skipped. Could you provide the complete statement used in Condition 8?

 

I have made a similar flow likes below, please check it for a reference.

 

The trigger is When a new email arrives.

 

Then the condition with the following function to filter subject based on multiple keywords using Or:

 

or(contains(triggerBody()?['Subject'],'UP1'),contains(triggerBody()?['Subject'],'dp2'),contains(triggerBody()?['Subject'],'ab3'))

is equal to

True

 

 

Then Condition 2 to check if the body contains specific word:

 

contains(triggerBody()?['Body'],'test')

is equal to

True

 

 

Under if yes branch, send an email.

1.PNG

 

By the way, there are some updates in Condition, please check the following blog:

https://flow.microsoft.com/en-us/blog/build-more-powerful-conditions-in-flows-and-more/

 

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.
Highlighted
New Member

Re: ‘OR’ Statements conditions are not working exactly

thanks Mabel

 

the complete text in Condition8 is below

 

@or(contains(triggerBody()?['Subject'], 'up1'), contains(triggerBody()?['Subject'], 'up4'), contains(triggerBody()?['Subject'], 'dp3'), contains(triggerBody()?['Subject'], 'xp2'), contains(triggerBody()?['Subject'], 'ewp'), contains(triggerBody()?['Subject'], 'upb'), contains(triggerBody()?['Subject'], 'upj'), contains(triggerBody()?['Subject'], 'sma'), contains(triggerBody()?['Subject'], 'up5'))

 

 

noting that i dont have the below as part of the text in my conditions

 

is equal to

True

 

 

 

Highlighted
Community Support
Community Support

Re: ‘OR’ Statements conditions are not working exactly

Hi @svcMon ,

 

I assume that your flow was created before the new advanced condition builder released.

 

From the blog we know that we could also add a condition to your flow by selecting New step, please take a try with it.

 

If possible, please recreate the condition to see if it will work.

 

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.

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!

Users online (4,590)