cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
BarbaraSelden
Regular Visitor

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
v-yamao-msft
Community Support
Community Support

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.

View solution in original post

1 REPLY 1
v-yamao-msft
Community Support
Community Support

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.

View solution in original post

Helpful resources

Announcements
UG GA Amplification 768x460.png

Launching new user group features

Learn how to create your own user groups today!

Community Connections 768x460.jpg

Community & How To Videos

Check out the new Power Platform Community Connections gallery!

Welcome Super Users.jpg

Super User Season 2

Congratulations, the new Super User Season 2 for 2021 has started!

Carousel 2021 Release Wave 2 Plan 768x460.jpg

2021 Release Wave 2 Plan

Power Platform release plan for the 2021 release wave 2 describes all new features releasing from October 2021 through March 2022.

Microsoft Ignite 768x460.png

Find your focus

Explore the latest tools,training sessions,technical expertise, networking and more.

Top Solution Authors
Top Kudoed Authors
Users online (2,365)