I have been working on this problem for a week. I have tried many different approaches and had minimum success. My experience with Power Automate is not extensive. I have tried to exhaust all of my resources such as the documentation and the forums for power automate.
The goal here is to populate List B with any new unique value that shows up in List A under the Person Field. There are going to be duplicates in List A regularly. List B will be a stats sheet and each time a new user enters an item in List A they will get their own new row in List B. I want no duplicate entries for people in List B. The data type of the fields is set to person and the schema and person details from Office 365 need to carry over for further processing in List B at a later time. I have struggled with this so much I created my own test environment and dumbed everything down as much as possible.
List A:
List B:
The flow:
Starts simply enough, pull both lists and create two arrays with just the person fields
Then cycle through each value of List A.
For each person in List A: create a new filter array from the select of List B.
@Anonymous(contains(body('Select_Person_from_List_B'), items('Apply_to_each_Select_Person_from_List_A')))
The goal here is to get a length() of Filter that is > 0 if there is a match. That way I know that the person is already in List B.
If the Filter Array is > 0 then:
add a new list item to List B.
Errors I am getting right now:
Thank you for any suggestions. Vague answers will be pondered but not understood.