cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Rejdy
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
yashag2255
Dual Super User II
Dual Super User II

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
yashag2255
Dual Super User II
Dual Super User II

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

Thank you @yashag2255 !

it worked as a charm.

efialttes
Super User
Super User

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!



Hey @efialttes ,

yeah that is exactly i was looking for!

 

Thanks!

@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
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.

Users online (3,010)