cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Frequent Visitor

Trigger Condition on Person or Group field

I'm experiencing an infinite loop on a flow, whereby a SharePoint list item needs to update itself.

 

The field change that occurs is when a person or group field ('Lead') is changed.  To try and get around the loop I have created another person or group field ('PrevLead').    I only want the flow to run when the 2 fields are different (i.e. when the 'Lead' value is changed), and so when the flow triggers, this will update the 'PrevLead' field so they are both the same, hence the flow won't trigger again until someone changes the 'Lead' field again.

 

As mentioned, these are both identical field types (person or group), but I have no idea how to reference these field types in a trigger condition, or if it is even possible.  

 

So I know the below is completely wrong, but this is what I'm trying to achieve - can anyone help?

@not(equals(triggerBody()?['Lead'],['PrevLead']))

 

1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted
Community Support
Community Support

Hi @danbert1973,

 

Please have a try the following expression:

@not(equals(triggerOutputs()?['body/Lead/Email'],triggerOutputs()?['body/PrevLead/Email']))

 

Best Regards,
Community Support Team _ Lin Tu
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

2 REPLIES 2
Highlighted
Community Support
Community Support

Hi @danbert1973,

 

Please have a try the following expression:

@not(equals(triggerOutputs()?['body/Lead/Email'],triggerOutputs()?['body/PrevLead/Email']))

 

Best Regards,
Community Support Team _ Lin Tu
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

Highlighted

Hi @v-litu-msft 

 

Thank you so much for this, that has worked.  Great to know these tricks and they come so useful in future.

 

I have found another solution to this problem which also works great here.  This uses versioning and a multi-line text column.

 

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 (1,259)