cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
danbert1973
Helper I
Helper I

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
v-litu-msft
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
v-litu-msft
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

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
Process Advisor

Introducing Process Advisor

Check out the new Process Advisor community forum board!

MPA User Group

Welcome to the User Group Public Preview

Check out new user group experience and if you are a leader please create your group

MBAS on Demand

Microsoft Business Applications Summit sessions

On-demand access to all the great content presented by the product teams and community members! #MSBizAppsSummit #CommunityRocks

Top Solution Authors
Top Kudoed Authors
Users online (36,504)