cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Bunly11
Helper V
Helper V

Need help getting nested gallery to display items

Hi all-

 

I am trying to get my nested gallery to display all the supplies for the item selected in Gallery1.

The data is from two SharePoint list: DrugTBL and SuppliesTBL.

 

Screen 1: Gallery1

Screen2: Gallery3=Gallery1.Selected and nested Gallery7 and I put

LookUp(SuppliesTBL, NewDrugID=Gallery1.Selected.DrugID)

 

I am able to display only the first supply of the record and but for this record there are 3 supplies total. 

Bunly11_0-1606630643685.png

 

How do I get the reset of the supplies to display? Similar to below.

Bunly11_1-1606631465128.png

 

Do I need to groupby or make a collection? I am not sure how to do either.

 

Thank you

 

6 REPLIES 6

@Bunly11 

 

You can check this specifically answered in our reply here to your other similar thread

 

To be clear, the Mock Collections are for illustration purposes only so someone else with similar issue can follow along without needing a data source. You do not need a Mock Collection in your case. The two initialized Collections are for mock data to pretend it is data from a real data source like a SharePoint list, etc. so it is easier for someone to try it on their own without necessarily having to know your specific scenario.

 

Note that however, the ClearCollect and other parts of the answer that are not related to the mock collections might still apply though, as ClearCollect for holding the contents of the outer gallery's selected item still does apply actually.

 

If still unsure how to do it after that, reply here and we might see if we can check into the specific steps for just your specific scenario only instead of the more widely applicable one.

WarrenBelz
Super User
Super User

Hi @Bunly11 ,

You need the GroupBy function to display the nested items of the second gallery and is the last field in the GroupBy statement, which is actually a record and is simply ThisItem.YourFinalGroupName.

I will be offline shortly due to time zone, but will pick up your response in the morning.

 

Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.

Hi @WarrenBelz 

Would you expand on the GroupBy function?

I am not sure how to combine Lookup based on the drug selected in the parent gallery and Group the supplies by drug name in my nested gallery.

 

LookUp(SuppliesTBL, NewDrugID=Gallery1.Selected.DrugID)

Thank you

Hi @Bunly11 ,

Which list do you want to do the nested gallery on and what is the field/s you need to group by. Also what do you need to display in the inner gallery?

Hi @Bunly11 ,

Just checking if you got the result you were looking for on this thread. Happy to help further if not.

Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.

Hi @WarrenBelz 

 

I figured it out - I didn't need to do groupby. I used "filter" vs "lookup".

I was able to display all the supplies and image for each drug.

I stopped using the lookup column for DrugID and it seemed to fix another problem. 

 

Thanks again

Helpful resources

Announcements
Ignite 2022

WHAT’S NEXT AT MICROSOFT IGNITE 2022

Explore the latest innovations, learn from product experts and partners, level up your skillset, and create connections from around the world.

Power Apps Africa Challenge 2022

Power Apps Africa Challenge

Your chance to join an engaging competition of Power Platform enthusiasts.

Super User 2 - 2022 Congratulations

Welcome Super Users

The Super User program for 2022 - Season 2 has kicked off!

September Events 2022

Check out all of these events

Attend in person or online, there are incredible conferences and events happening all throughout the month of September.

Users online (4,261)