cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
BarbaraSelden
Level: Powered On

how to chain conditions

I am creating VSTS items from emails. I want to have multipe conditions that prevent an item from becing created.

To begin with, i want it not to be created whenthe subject contains "foo" or "bar" or "blah".

i am not seeing any way to create multiple requirements with an "or" between them, and ther is no documentatio on how to do this otherwise.

Can you please tell me how to write a condition that does the above?

When Subject does not contain "foo" or "bar" or "blah"

 

 

1 ACCEPTED SOLUTION

Accepted Solutions
Community Support Team
Community Support Team

Re: how to chain conditions

Hi @BarbaraSelden,

 

To create a flow to create an item when the subject does not contain “foo”, “bar” or” blah”, you could use the following function.

 

@and(not(contains(triggerBody()?['Subject'],'foo')),not(contains(triggerBody()?['Subject'],'bar')),not(contains(triggerBody()?['Subject'],'blah')))

 

I have made a test with the following flow configuration, please take it for a reference.

1.PNG

 

Please have a try with it and feel free post back if you need more help.

 

More details about the funtion, please check this documentation:

https://docs.microsoft.com/en-us/azure/logic-apps/workflow-definition-language-functions-reference#c...

 

 

Best regards,

Mabel Mao

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.
1 REPLY 1
Community Support Team
Community Support Team

Re: how to chain conditions

Hi @BarbaraSelden,

 

To create a flow to create an item when the subject does not contain “foo”, “bar” or” blah”, you could use the following function.

 

@and(not(contains(triggerBody()?['Subject'],'foo')),not(contains(triggerBody()?['Subject'],'bar')),not(contains(triggerBody()?['Subject'],'blah')))

 

I have made a test with the following flow configuration, please take it for a reference.

1.PNG

 

Please have a try with it and feel free post back if you need more help.

 

More details about the funtion, please check this documentation:

https://docs.microsoft.com/en-us/azure/logic-apps/workflow-definition-language-functions-reference#c...

 

 

Best regards,

Mabel Mao

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
firstImage

Watch Sessions On Demand!

Continue your learning in our online communities.

Power Platform 2019 Release Wave 2 Plan

Power Platform 2019 Release Wave 2 Plan

Features releasing from October 2019 through March 2020

thirdimage

Flow Community User Group Member Badge

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

thirdImage

New Flow Community Board!

Check out the new Microsoft Flow Community Blog Topic Suggestion board!

fourthImage

Australia Summit

Travel to Melbourne and network with thousands of peers!

fifthimage

Microsoft Learn

Learn how to build the business apps that you need

sixthImage

Power Platform World Tour

Find out where you can attend!

seventhimage

Webinars & Video Gallery

Watch & learn from the Flow Community Video Gallery!

Top Kudoed Authors
Users Online
Currently online: 77 members 3,923 guests
Please welcome our newest community members: