Hello!
I have been trying unsuccessfully to either filter a gallery or build a collection that can be used as the source for a gallery.
I have two SharePoint lists:
- ActCat (contains activities - Columns: ID, Desc, etc.)
- ActTrack (tracks activities assigned to people - Columns: ActivityID, Person, Date, etc.)
ActivityID is a lookup column that uses ID (ActCat) to pull in other information about the activity.
I would like to display in a Gallery only those courses for which varUser does not already have assigned. In other words, I want to filter ActCat by any ID that is in ActTrack (as ActivityID) and assigned to varUser.
I have tried:
- Filter(ActCat,ID in Filter(ActTrack,Person.Email=varUser.mail).ActivityID) - error can't convert this data type. Power Apps can't covert this Number to Record. ID is the issue.
- Filter(ActCat,ID in LookUp(ActTrack,Person.Email=varUser.mail,ActivityID.Value)) - this returns only the first value that matches my criteria
- ForAll(ActCat,Collect(colTemp,Filter(ActCat,ID in LookUp(ActTrack,Person.Email = varUser.mail).ActivityID.Value))) - returns the same record from ActTrack 137 times (which is the number of records in ActCat)
I created a collection (colTemp) that has just the activities for which varUser has had assigned (13 records), but I'm not sure how to use it to filter ActCat.
Any help would be appreciated. Thank you!