I have two lists,
List A contains an a uniqueAppliation ID (single line string) and a related user (person) and a flag (Yes/no)
List B has two columns a user (person) and count of uniqueApplication IDs (single line string).
Currently I query list A filtering on "related user" <> null AND flag = Yes, this returns a collection of strings representing the users. The format is an mixture of characters domains and staffID in short something like xxxDOMAIN\staffID
Subsequently I remove duplicates from the collection.
Next I would like to, "for each" item in my collection, to count how many uniqueApplication IDs there are in list A for this user.
finally I would like to populate List B with items that do not already exist in the list B. (The idea beeing that as my application ID register linked to a person updates and changes, my distinct user list will evolve but not contain any duplicate users)
My problems are:
1) I can not filter list A "users" based on the results from my query of "users" in list A
2) I can not look up users in list B either (to ascertain that I don't add duplicates) as the return from the look-up is not usable as idetifier.
I have concluded that it appears the only "filter" I can apply querying a list using users (person), is display name. unfortunately display name is not unique....
What shoud I do?