I have a gallery inside a gallery with Items-property of the inner subGallery set to:
Filter( ThisItem.SubDetails; Amount=0 )
SubDetails is a Common Data Service entity on the many side of the relationship
Unfortunately I get a delegation warning.
If I change the formula to "ThisItem.SubDetails" I don't get a delegation warning but then I get too many items in the subgallery. Is there any workaround to avoid the delegation warning. The official documentation says that Filter is delegable...
You may want to check out the GroupBy() function to create your Gallery/Subgallery. functions/function-groupby
@PaulD1 has a nice video about how to use it for related tables and how to use flexible height galleries to displapy the data at Video-Gallery/PowerApps-Gallery-SubGallery-using-GroupBy-and-Flexible-Height/
I'm watching the videos of Paul and will see if that works but I am still wondering why I get a delegation warning. Is my method wrong? Because it works without the "filter"-function. I just want to show less items, so I need to filter...
Hi @svenvu ,
Could you please share more of your data source?
Do you use one same data source or different ones?
Could you please reference this?
Hope this could be helpful.
I am using 2 custom entities in CDS as a datasource and defined a relationship between the entities:
Items property of the outer gallery:
Items property of the inner gallery:
I've tried the formula from the second reference but without success:
This looks like a very solid formula but the "=" is red underlined and says "Invalid argument type". Why is that if I may ask?
Tried some other formulas as well but without success :s
Could you firstly use one button to create one collection to test whether it works fine?
I test as this:
Then the inner Gallery.Items=Filter(test,ID=ThisItem.ID)
Thank you for trying this out with me!
I did the same test as you did with the same formula's and didn't get any kind of errors. The subgallery ID looks fine because there are indeed always 4 subitems for each Masteritem but when I look into the collection I see it contains the columns of the MasterItems entity from CDS, and creates 4 records for each MasterItems ID.
This means that the collection does not contain the data from the SubDetails enity from CDS and therefore it seems that I can not add fields from the SubDetails to display in the inner gallery? Or do I need to add labels with other formula's?
So what I really need is that the outer gallery contains MasterItem fields and the inner gallery SubDetails fields