I'm trying to build a random associate audit, and I'm having trouble with the logic. All the data is stored in sharepoint lists and I have an associate table (basic ID, name and Last_Audit_Date) / manager table (mostly helps with having a distinct list of managers (plus permissions)).
At the click of a button, I want to generate an audit for a random associate for each manager. I planned to "ForAll(managers, collect first associate with the oldest audit date (pulling nulls first)" but it seems I can't nest a clearcollect in a ForAll, and I'm not sure how to proceed.
Every manager has a different amount of associates so can't hard code any numbers. Once I have the random associate, I plan on patching to the audit table to track audit history.