cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
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
Highlighted
Community Support
Community Support

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.

View solution in original post

1 REPLY 1
Highlighted
Community Support
Community Support

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.

View solution in original post

Helpful resources

Announcements
Community Conference

Power Platform Community Conference

Check out the on demand sessions that are available now!

Power Platform ISV Studio

Power Platform ISV Studio

ISV Studio is designed to become the go-to Power Platform destination for ISV’s to monitor & manage published applications.

Tech Marathon

Maratón de Soluciones de Negocio Microsoft

Una semana de contenido con +100 sesiones educativas, consultorios, +10 workshops Premium, Hackaton, EXPO, Networking Hall y mucho más!

Top Solution Authors
Top Kudoed Authors
Users online (5,160)