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!

M365 768x460.jpg

Microsoft 365 Collaboration Conference | December 7–9, 2021

Join us, in-person, December 7–9 in Las Vegas, for the largest gathering of the Microsoft community in the world.

Top Solution Authors
Users online (1,853)