cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Anonymous
Not applicable

Need to use OR and CONTAINS

I need to create a condition that does the following:

 

ApplicationStatus field does not contain "Status A" OR "Status B" OR "Status C"

 

How would this look in Advanced Mode?

2 REPLIES 2
Memorable Member
Memorable Member

Hi @Anonymous

 

Your condition might look like the expression below:

@or(not(contains(triggerBody()?['ApplicationStatus'], 'Status A')),not(contains(triggerBody()?['ApplicationStatus'], 'Status B')),not(contains(triggerBody()?['ApplicationStatus'], 'Status C')))

One way you can learn to build these types of expressions is by creating the condition in basic mode and then switch to advanced mode. Copy the expression and paste it in your favorite text editor; I use Notepad++. Also, check out the Workflow Definition Language scheme for Azure Logic Apps since all the Flow expressions are based on them. In your case, check out the Logical Functions section.

 

Regards,

Fausto Capellan, Jr

 

 

Fausto Capellan, Jr
Did I answer your question? Mark my post as a solution! Did my response help? Please give it a thumbs up!
Community Support
Community Support

Hi @Anonymous,

 

Could you please share a screenshot of your flow's configuration?

Further, could you please show a bit more about the ApplicationStatus field that you mentioned?

 

I agree with @faustocapellanj's thought almost, I assume that the ApplicationStatus column is a Choice type column, I have created a SharePoint list on my side and the data structure of it as below:7.JPG

 

 

I have made a test on my side and please take a try with the following workaround:

  • Add a "When an item is created" trigger.
  • Add a Condition, click "Edit in advanced mode", type the following formula:
  • @or(not(contains(triggerBody()?['ApplicationStatus']?['Value'], 'Status A')),not(contains(triggerBody()?['ApplicationStatus']?['Value'], 'Status B')),not(contains(triggerBody()?['ApplicationStatus']?['Value'], 'Status C')))
    Within "If/yes" branch of Condition, add a "Send me an email notification" action.

Image reference:8.JPG

The flow works successfully as below:9.JPG

 

 

Best regards,

Kris

 

 

Community Support Team _ Kris Dai
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Helpful resources

Announcements
Microsoft Ignite

Microsoft Ignite

Join digitally, March 2–4, 2021 to explore new tech that's ready to implement. Experience the keynote in mixed reality through AltspaceVR!

New Super Users

Meet the Power Automate Super Users!

Many congratulations to the Season 1 2021 Flownaut Crew!

New Badges

New Solution Badges!

Check out our new profile badges recognizing authored solutions!

MPA Community Blog

Power Automate Community Blog

Check out the community blog page where you can find valuable learning material from community and product team members!

Users online (69,761)