cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
xyd
Helper II
Helper II

Best Practices for Gallery items with related CDS entities

I have a CDS Entity. There are many lookup fields on that entity, so a lot of 1:N relationships hanging off this entity. 

In a canvas app I have a galleries showing data from a CDS Entity.

There are various other galleries in the same app that uses the same entity and filtering on those lookup fields. 

 

For the Galleries Items property, as far as I can see - 

It is possible to do the filtering on the Entity data source directly. 

Alternatively I can create a collection and then filter on that collection. 

  

Issue is I have noticed that Collection doesn't automatically bring in all the relational data in, unless the collection is referenced in a Gallery already. 

  

Question is what is the best practice here? filtering on the DS directly every time? Or use Collection where possible? 

Does this have any impact on performances / API calls or any other consideration, please? 

1 ACCEPTED SOLUTION

Accepted Solutions
v-siky-msft
Community Support
Community Support

Hi @xyd ,

 

 

Since the CDS entity is a delegable data source and most of functions and operators are all delegable for CDS, I can't find any reason to use filter based on collection, rather than the entity itself.  Reference: Power Apps delegable functions and operations for the CDS for Apps 

The API call limits of CDS is 1000 calls per 60 seconds which is enough in general case.

Further more, the ClearCollect function to collect entity to collection isn't a delegable function, which can affect performance instead.

 

Hope this helps.

Sik

View solution in original post

4 REPLIES 4
v-siky-msft
Community Support
Community Support

Hi @xyd ,

 

 

Since the CDS entity is a delegable data source and most of functions and operators are all delegable for CDS, I can't find any reason to use filter based on collection, rather than the entity itself.  Reference: Power Apps delegable functions and operations for the CDS for Apps 

The API call limits of CDS is 1000 calls per 60 seconds which is enough in general case.

Further more, the ClearCollect function to collect entity to collection isn't a delegable function, which can affect performance instead.

 

Hope this helps.

Sik

@v-siky-msft 

 

I am with you on the delegable vs non delegable. 

 

One further question regarding your statement of

... I can't find any reason to use filter based on collection, rather than the entity itself.   ...

Even if there a huge data set and but I only need to work with a much small of subset of data...?

 

Thanks in advanced

v-siky-msft
Community Support
Community Support

Hi @xyd ,

 

If you need some part of CDS entity data, I would suggest you apply a Filter formula to Gallery.Items property.

 

Sik

@v-siky-msft 

 

Ah Ok

I will try that approach...

 

many thanks

Xun

Helpful resources

Announcements
Power Platform Conf 2022 768x460.jpg

Join us for Microsoft Power Platform Conference

The first Microsoft-sponsored Power Platform Conference is coming in September. 100+ speakers, 150+ sessions, and what's new and next for Power Platform.

Power Platform Call June 2022 768x460.png

Power Platform Community Call

Join us for the next call on June 15, 2022 at 8am PDT.

PA Virtual Workshop Carousel 768x460.png

Register for a Free Workshop

This training provides practical hands-on experience in creating Power Apps solutions in a full-day of instructor-led App creation workshop.

PA.JPG

New Release Planning Portal (Preview)

Check out our new release planning portal, an interactive way to plan and prepare for upcoming features in Power Platform.

Top Solution Authors
Top Kudoed Authors
Users online (3,351)