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

Compare 2 Sharepoint Lists and add missing Person

I have two Sharepoint Lists, each with a Person column (an O365 user).  I need to compare the two lists, and if a Person is missing from List 2, I need to add them as a new item.

 

I've tried multiple options but all seem to come back with an error saying it can't create a duplicate item, when the name is already there.

 

The flow looks like this roughly:

  • Get Items from list 1
  • Get Items from list 2
  • Condition, if Person from list 2=Person from list 1, do nothing.  If not, Create Item in list 2

Suggestion?

2 ACCEPTED SOLUTIONS

Accepted Solutions
v-bofeng-msft
Community Support
Community Support

Hi @andyJDL :

Could you tell me:

Do the person columns allow multiple selections?I assume they do not allow multiple selections. I've made a test for your reference:

1\My data source:

1.JPG2.JPG

2\3.JPG4.JPG6.JPG

The Result

7.JPG

Best Regards,

Bof

 

View solution in original post

Hi @andyJDL :

   According to the screenshot you provided, I can roughly determine that the person column allows multiple selections when you create this flow.(Because there is an "apply to each 3")

   Considering that you have set the person column to not allow multiple selections. I advice you to recreate a flow and then use Claims to update the person column.

  Best Regards,

  Bof

View solution in original post

6 REPLIES 6
v-bofeng-msft
Community Support
Community Support

Hi @andyJDL :

Could you tell me:

Do the person columns allow multiple selections?I assume they do not allow multiple selections. I've made a test for your reference:

1\My data source:

1.JPG2.JPG

2\3.JPG4.JPG6.JPG

The Result

7.JPG

Best Regards,

Bof

 

Thanks.  However I'm getting the same result (duplicate).  Just to simplify things, I am using a Person column that does not allow multiple choices.

In your example, do I need to be using a particular aspect of the Person field (Person, Claims, DisplayName, Email, etc)?

In case it's helpful to check my work:
Screen Shot 2021-01-26 at 10.16.32 AM.png

Hi @andyJDL :

   According to the screenshot you provided, I can roughly determine that the person column allows multiple selections when you create this flow.(Because there is an "apply to each 3")

   Considering that you have set the person column to not allow multiple selections. I advice you to recreate a flow and then use Claims to update the person column.

  Best Regards,

  Bof

Thanks.  That did it.  Any way to make it work on a Person field that does allow multiple selections?

 

Never mind.  Thanks again!

Helpful resources

Announcements
Power Automate News & Announcements

Power Automate News & Announcements

Keep up to date with current events and community announcements in the Power Automate community.

Power Automate Community Blog

Power Automate Community Blog

Check out the latest Community Blog from the community!

Top Solution Authors
Users online (5,904)