Here is my challenge:
- I query from AD a list of the people in my company, and put it in a collection: colPeople
- I save that list in a CDS table, named tblPeople, so that I can add more details for each of the persons
This gives me a snapshot of who is in the company at the time of the query.
If I want an updated list from AD, I can query again and populate colPeople, but it will give me a different list of items, because some people will have joined, some people will have left.
I want to update my CDS-based table with the latest updates from AD, what it the best way to proceed if I need to:
- remove from tblPeople the people that are not in colPeople anymore
- add to tblPeople the people that have appeared in colPeople since the last query
- modify information in tblPeople to match the latest colPeople information
I am trying to create a new collection that would match the first need, and the best I can do is a button with:
ForAll(colPeople,If(IsBlank(LookUp(tblPeople,ThisRecord.'Full Name' = ThisRecord.'Full Name')),Collect(colinADnotCDS,ThisRecord))).
However, "ThisRecord" seems to always refer to tblPeople items, not colPeople items.
Thanks for any pointer or help!!