cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Poma1
Helper III
Helper III

Collect nested gallery

Hello all,

 

I have a gallery (Gal_1) with another gallery (gal_2) inside of it. Now I really need help to create a colection of Gal_2. Whatever I have tried only gives me a collection without any data inside.

 

Your help will be very appreciated.

Thanks in advance.

 

Regards

Angela

1 ACCEPTED SOLUTION

Accepted Solutions
RusselThomas
Microsoft
Microsoft

Hi @Poma1 ,

A gallery contains multiple rows of data, so I'm assuming the context of collection is for a specific row inside the gallery.  Assuming you have a ParentGallery with each row containing a ChildGallery, and also assuming you want to collect the data for the currently selected item in ParentGallery, then you can add a button outside the gallery and set its OnSelect: property to the following;

ClearCollect(collectSelectedChildGallery, ParentGallery.Selected.ChildGallery.AllItems)

This will place the contents of ChildGallery.AllItems for the currently selected row of ParentGallery into the collectSelectedChildGallery collection.

 

Hope this helps,

RT

View solution in original post

1 REPLY 1
RusselThomas
Microsoft
Microsoft

Hi @Poma1 ,

A gallery contains multiple rows of data, so I'm assuming the context of collection is for a specific row inside the gallery.  Assuming you have a ParentGallery with each row containing a ChildGallery, and also assuming you want to collect the data for the currently selected item in ParentGallery, then you can add a button outside the gallery and set its OnSelect: property to the following;

ClearCollect(collectSelectedChildGallery, ParentGallery.Selected.ChildGallery.AllItems)

This will place the contents of ChildGallery.AllItems for the currently selected row of ParentGallery into the collectSelectedChildGallery collection.

 

Hope this helps,

RT

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.

365 EduCon 768x460.png

Microsoft 365 EduCon

Join us for two optional days of workshops and a 3-day conference, you can choose from over 130 sessions in multiple tracks and 25 workshops.

Users online (3,499)