cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Jerry1567
Level: Powered On

Access Parent's Gallery Item in a Nested Gallery

I currently have a nested gallery where the nested gallery needs to be aware of the columns of the item of the parent.

 

The structure may look something like this.

The hours text input box will get it's information from a Filter() from another table, where the ID of both the parent item and the child item in the galleries are needed. The parent being the TaskID and the child being the PersonID.

 

gallery.PNG

 

 

Is there something like, ParentItem.ID for galleries because it seems the only thing I can access seems to be Parent.AllItems which is not what is needed.

 

Thanks

1 ACCEPTED SOLUTION

Accepted Solutions
AndrewCarter
Level 8

Re: Access Parent's Gallery Item in a Nested Gallery

Hi @Jerry1567 ,

Can you put a label (lblParentID) on the Gallery in the Parent that has Text:ThisItem.ParentID; and then use the lblParentID in the Lookup on the Child gallery - you can hide this label

Lookup(Costs, parent = lblParentID && child = ThisItem.ID)

Regards,

Andrew

View solution in original post

4 REPLIES 4
Dual Super User
Dual Super User

Re: Access Parent's Gallery Item in a Nested Gallery

Hi @Jerry1567 

 

Yes you can create a nested Gallery inside a Gallery control. There is a limitation though that you cannot have more than 1 nested gallery i.e. allowed only till 2 layers of hierarchy.
 
For doing so, you can use the Filter query, the only requirement is the attribute you want to nest should be of type table with either single or multiple tables. 
 
Suppose your Main Gallery has Items, Filter(SPList1,Direction= "North")
 
and another attribute(location) of this SPList1 is of type table, in the nested gallery you can directly refer the items as: ThisItem.location
 
Hope this Helps!

If this reply has answered your question or solved your issue, please mark this question as answered. Answered questions helps users in the future who may have the same issue or question quickly find a resolution via search. If you liked my response, please consider giving it a thumbs up. THANKS!
Jerry1567
Level: Powered On

Re: Access Parent's Gallery Item in a Nested Gallery

Hi @yashag2255 ,

 

Thank you for your response, the situation is that I need both the current item in the parent gallery and child gallery to do a filter for a value.

 

So it would be something like Lookup(Costs, parent=ParentID (from parent item) && child=ChildID).cost
where the parent is a Task item from the Tasks SPList and child is a person from Person's table for instance.

AndrewCarter
Level 8

Re: Access Parent's Gallery Item in a Nested Gallery

Hi @Jerry1567 ,

Can you put a label (lblParentID) on the Gallery in the Parent that has Text:ThisItem.ParentID; and then use the lblParentID in the Lookup on the Child gallery - you can hide this label

Lookup(Costs, parent = lblParentID && child = ThisItem.ID)

Regards,

Andrew

View solution in original post

Jerry1567
Level: Powered On

Re: Access Parent's Gallery Item in a Nested Gallery

Hi @AndrewCarter,

 

This was exactly what I was looking for! Thank you so much!

Helpful resources

Announcements
thirdimage

Power Automate Community User Group Member Badge

Fill out a quick form to claim your user group badge now!

sixthImage

Power Platform World Tour

Find out where you can attend!

Power Platform 2019 release wave 2 plan

Power Platform 2019 release wave 2 plan

Features releasing from October 2019 through March 2020

fifthimage

Microsoft Learn

Learn how to build the business apps that you need.

Top Kudoed Authors (Last 30 Days)
Users online (5,731)