cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
silenttree
Regular Visitor

Two trigger conditions based on specific users

Hello, 

 

it´s my first time here and my first time with MS Power automate. I´m a controler and no informatican. But I hope to digitalisise our invoice process in this way. I hope my request is right here.

 

I have a folder where new invoice in form of pdf files come to. When two specific users have checked (modified) the invoice, it should be copied and moved to two different folders. With one user as trigger condition it works very well

 

I used: @equals(triggerBody()?['Editor']?['Email'], 'user@example.de')

 

but if i want to use two conditions like in the image below it isn´t working.

 

I also tried to use: @And(equals(triggerBody()?['Editor']?['Email'], 'user@example.de'),equals(triggerBody()?['Editor']?['Email'], 'user2@example.de'))

 

but it isan´t working, too.

 

I hope someone can help me. 

 

Thanks and best regards

Marcus  

Trigger Conditions two user.jpg

1 ACCEPTED SOLUTION

Accepted Solutions

Sorry, I misunderstood. It's never going to work how you imagine it. Because the modified field is only ever going to show the last person that modified it.

 

You could have a custom list with tick boxes on two columns instead, like:

 

Initial Check Complete

Secondary Check Complete

 

But if I understand you correctly, I don't think your approach will work and you need to think of a new workflow.

View solution in original post

4 REPLIES 4
Paulie78
Super User
Super User

This should do what you want:

or(
  equals(triggerBody()?['Editor']?['Email'], 'user@example.de'),
  equals(triggerBody()?['Editor']?['Email'], 'user2@example.de')
)

See how you get on. 

Hello Paulie78,

 

If I use your suggestion, then the flow starts either when user 1 changes the file or when user 2 changes the file.

But in my case both user have to change the file and only then the flow should start. 

 

Is the problem probably because the column "changed by" shows only the last user who changed the file and don´t save all user who have changed the file? 

Sorry, I misunderstood. It's never going to work how you imagine it. Because the modified field is only ever going to show the last person that modified it.

 

You could have a custom list with tick boxes on two columns instead, like:

 

Initial Check Complete

Secondary Check Complete

 

But if I understand you correctly, I don't think your approach will work and you need to think of a new workflow.

Thanks for trying to help me. Now I know my first way to find a solution will never work and I have to find a new way. I already have an idea for that. 

Helpful resources

Announcements
MPA Virtual Workshop Carousel 768x460.png

Register for a Free Workshop

Learn to digitize and optimize business processes and connect all your applications to share data in real time.

Power automate tips 768x460 v2.png

Restore a Deleted Flow

Did you know that you could restore a deleted flow? Check out this helpful article.

Microsoft Build 768x460.png

Microsoft Build is May 24-26. Have you registered yet?

Come together to explore latest innovations in code and application development—and gain insights from experts from around the world.

May UG Leader Call Carousel 768x460.png

What difference can a User Group make for you?

At the monthly call, connect with other leaders and find out how community makes your experience even better.

Users online (2,678)