cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Advocate II
Advocate II

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
Highlighted
Resolver II
Resolver II

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
Highlighted
Dual Super User III
Dual Super User III

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!
Highlighted
Advocate II
Advocate II

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.

Highlighted
Resolver II
Resolver II

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

Highlighted
Advocate II
Advocate II

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
August 2020 Community Challenge: Can You Solve These?

August 2020 Community Challenge: Can You Solve These?

We're excited to announce our first cross-community 'Can You Solve These?' challenge!

secondImage

Return to Workplace

Reopen responsibly, monitor intelligently, and protect continuously with solutions for a safer work environment.

secondImage

Super Users Coming in August

We are excited for the next Super User season.

secondImage

Community User Group Member Badges

FIll out a quick form to claim your community user group member badge today!

secondImage

Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

Top Solution Authors
Top Kudoed Authors
Users online (7,044)