I have a gallery in Power Apps that is combining data from three separate entities:
The gallery should show a field from Customers, a field from Customer Details, and the date of the last order they placed from orders. I have accomplished this in my app using AddColumns in the Items property but it is very slow. I used AddColumns instead of looking up the values on the label because I need to sort on the values from Customer Details and Orders.
Is it possible to create a view between these 3 tables? I have only been able to get one on Customer Details and add a field from Customer. Is there something like Join in CDS where I can create the view and pull that into the app instead?
The statement is consistent with my testing via the monitor tool. Thanks for the link as well, I like that solution too but I have more than 2000 records in my table and based on my understanding that is the max number of records which can be added.
You can test it to see. Another alternative to providing increasing performance is to cache the lookup tables by running a collection on them either at the OnStart of the app or in the OnVisible property of the screen containing the gallery. One of my heros @Meneghino describes this in his blog https://baizini-it.com/blog/index.php/2018/01/11/powerapps-caching-lookup-tables-to-improve-performance/
In this link I am seeing the following: "When you place a LookUp function on a Label inside of the Gallery, then that LookUp will be performed once for every record in the Gallery. That means if you have 100 records in the Gallery the app has to perform 100 individual LookUp calls to the data source to render."
Is this out of date?
It's not the lookup that adds the lag, it's the AddColumns() because this function is not delegatable. A lookup does the searching at the server level.
Thanks for the response. I had a LookUp in my AddColumns function and from my understanding, the app will make the lookup call for each row in the gallery which I am trying to avoid because of the hit to pefromance. It sounds like building a view of this complexity is not possible.
Hi @Cooper01
Sort the view Descending and do a lookup in the canvas app and it will find the last record since Lookup() finds the first matching record but if it is presorted descending, it will actually find the last one. This technique will avoid possible delegation issues.
How would you go about configuring logic to only add certain rows to the view (i.e. the last order placed)?
Hi @Cooper01
You should be able to add columns from related entities to a view.
stampcoin
17
ankit_singhal
11
Super User 2025 Season 1
mmbr1606
9
Super User 2025 Season 1