cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Jerry1567
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
Anonymous
Not applicable

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
yashag2255
Dual Super User II
Dual Super User II

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!

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.

Anonymous
Not applicable

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

Hi @Anonymous,

 

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

Helpful resources

Announcements
PA User Group

Welcome to the User Group Public Preview

Check out new user group experience and if you are a leader please create your group

MBAS Attendee Badge

Claim Your Badge & Digital Swag!

Check out how to claim yours today!

secondImage

Are Your Ready?

Test your skills now with the Cloud Skill Challenge.

secondImage

Demo Extravaganza is Back!

We are excited to announce that Demo Extravaganza for 2021 has started!

MBAS on Demand

Microsoft Business Applications Summit sessions

On-demand access to all the great content presented by the product teams and community members! #MSBizAppsSummit #CommunityRocks

Top Solution Authors
Top Kudoed Authors
Users online (64,514)