Hello Experts,
In my canvas app, I am using
1) Users Entity
2) Custom entity called Routes
Routes has a lookup field called Courier that has Users Entity as a related entity.
I have two requirements:
1) I want a gallery that shows the list of distinct couriers as Routes can have more than one row associated with one courier.
2) I want to have Search text box as well which can search couriers bases on Full Name for example which is a field in Users Entity.
What I have tried so far:
1) I have not been able to do Users.Routes (It says the specified column is accessible in this context)
2) Distinct(Routes, Courier).Result (This works for requirement #1 but I do not know how to make search work (requirement #2))
So, is there a way to get only the distinct records from Users entity that are referenced in Routes entity?
Hi @Anonymous ,
Here is a simple workaround, create a new column by AddColumns function to store the FullName of couriers from User Entity.
Please try to put the following code to Gallery.Items property:
Search(Distinct(AddColumns(Routes,"UserFullName",Courier.'Full Name'),UserFullName),SearchTextInput1.Text,"Result")
Set Text property of Label inside Gallery: ThisItem.Result
Hope this helps.
Sik
Hi,
Requirement 1: Use the formula Distinct(Routes, Courier) to get the distinct couriers, and in the gallery use the formula ThisItem.Result.'Full Name' to display the full name.
Requirement 1 & 2: Following are the steps,
Please click Accept as Solution, if this solution solved your issue. If this post was useful, please consider giving it Thumbs Up.
Thanks & Regards,
Devendra Singh
mmbr1606
22
Super User 2025 Season 1
stampcoin
17
Michael E. Gernaey
15
Super User 2025 Season 1