cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Helper II
Helper II

Trigger conditions - path

Hello guys!

I am again asking you for your help with my flow 🙂

 

As i would like to create only one flow for my approval process i think i have to work with Trigger conditions. My situation is following: we have an approval process for 3 units under one department, the process is triggered by multiple people and approvers are different for each unit. Our folder tree in Sharepoint is: Orders/Unit(1,2,3)/status(new, approved, declined, signed)/responsible person(A,B,C). I want the flow to trigger only when a file is added to folder "new" for each of the 3 units (because our flow creates new files in other folders during the process, such as signed pdf from AdobeSign in folder "signed"). Therefore, i was thinking about adding multiple trigger conditions to the trigger, as follows:

 

@equals(triggerBody()?['{Path}'], 'Shared Documents/Orders/Unit(1,2,3)/new/responsible(A,B,C)/')

 

This would result in 9 trigger conditions. When i added only one condition as mentioned above, the flow worked, but when i was trying to add second row the flow was able to be saved but it did not work anymore (not even the first condition).

 

@equals(triggerBody()?['{Path}'], 'Shared Documents/Orders/Unit1/new/responsibleA/')

@or(equals(triggerBody()?['{Path}'], 'Shared Documents/Orders/Unit1/new/responsibleB/'))

 

 

Does anyone know how to solve this issue and help me? Are my conditions written wrong? Thank you in advance!

1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted
Dual Super User III
Dual Super User III

Hi @Rejdy 

 

Can you share more details on how did you club the conditons? 

 

For example if you wanted an OR condition it would look something like this: 

@or(equals(triggerBody()?['{Path}'], 'Shared Documents/Orders/Unit(1,new/responsible(A,B,C)/'),equals(triggerBody()?['{Path}'], 'Shared Documents/Orders/Unit1/new/responsibleA/'))

 

Hope this Helps!

If this reply has answered your question or solved your issue, please mark this question as answered. Answered questions helps users in the future who may have the same issue or question quickly find a resolution via search. If you liked my response, please consider giving it a thumbs up. THANKS!

 

View solution in original post

5 REPLIES 5
Highlighted
Dual Super User III
Dual Super User III

Hi @Rejdy 

 

Can you share more details on how did you club the conditons? 

 

For example if you wanted an OR condition it would look something like this: 

@or(equals(triggerBody()?['{Path}'], 'Shared Documents/Orders/Unit(1,new/responsible(A,B,C)/'),equals(triggerBody()?['{Path}'], 'Shared Documents/Orders/Unit1/new/responsibleA/'))

 

Hope this Helps!

If this reply has answered your question or solved your issue, please mark this question as answered. Answered questions helps users in the future who may have the same issue or question quickly find a resolution via search. If you liked my response, please consider giving it a thumbs up. THANKS!

 

View solution in original post

Highlighted

Thank you @yashag2255 !

it worked as a charm.

Highlighted
Dual Super User III
Dual Super User III

Hi!

Did you consider the possibility to use contains()?

@contains(triggerBody()?['{Path}'], 'Shared Documents/Orders/')

and

@contains(triggerBody()?['{Path}'], '/new/')

and

@contains(triggerBody()?['{Path}'], '/UnitX/')

 

So no matter you add more responsibles in the feature, your flow is easier to mantain

Hope this helps



Each time you click on any of our inspiring answers 'Thumb up' icon...
...an ewok scapes from the stormtroopers.

Be grateful, Thumbs up! Save the Galaxy for free!


Escribo sobre Power Automate en:
https://medium.com/anyone-can-automate/

Proud to be a Flownaut!



Highlighted

Hey @efialttes ,

yeah that is exactly i was looking for!

 

Thanks!

Highlighted
Dual Super User III
Dual Super User III

@Rejdy 

Glad to help! Please note you can select more than one solution even from different community members.

THanx for making this community great!



Each time you click on any of our inspiring answers 'Thumb up' icon...
...an ewok scapes from the stormtroopers.

Be grateful, Thumbs up! Save the Galaxy for free!


Escribo sobre Power Automate en:
https://medium.com/anyone-can-automate/

Proud to be a Flownaut!



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.

Top Solution Authors
Top Kudoed Authors
Users online (8,111)