I have a SharePoint list of Projects that has a lookup column for the Client. I am trying to get a Collection of all the Clients that are included in at least one Project.
I added the following function to the App OnStart event:
ClearCollect(collProjectClients, Distinct(Filter(ShowColumns(Projects, "Client", "Active"), Active=true), Client))
The Client being returned is a table (because it is a lookup field). Right now, this is returning one row -- I believe because it doesn't look at the Client table. Is there any way to bring in individual fields from the Client lookup, instead of the whole table? I tried:
ClearCollect(collProjectClients, Distinct(Filter(ShowColumns(Projects, "Client.ID", "Client.Title", "Active"), Active=true) ,Client.ID))
But it doesn't recognize the Client.ID and Client.Title so doesn't run. I also tried:
ClearCollect(collProjectClients, Distinct(Filter(ShowColumns(Projects, ShowColumns(Client, "ID", "Title"), "Active"), Active=true), Client)) but this doesn't work, either.