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.

View solution in original post

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.

View solution in original post

Helpful resources

Announcements
thirdimage

Power Automate Community User Group Member Badge

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

firstImage

Incoming: New and improved badges!

We've given our badges an overhaul and also added some brand new ones!

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 Power Automate Community Video Gallery!

Top Kudoed Authors (Last 30 Days)
Users online (4,649)