web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / Is it possible to refe...
Power Apps
Unanswered

Is it possible to reference a parent gallery's item in a nested gallery?

(0) ShareShare
ReportReport
Posted on by 18

Hello, I'm trying to use nested galleries to create an expandable menu. Each parent menu has an "expand" button with the following OnSelect formula: 

 

If(
CountRows(Filter(Expanded, Value=ThisItem.Object_Identifier)) > 0,
Remove(Expanded, First(Filter(Expanded, Value=ThisItem.Object_Identifier))),
Collect(Expanded, ThisItem.Object_Identifier)
)

Object_Identifier is a unique identifier for each record in the data source. The expand button adds the current item's identifier to a collection called "Expand".

 

The child gallery's height property has the following formula:

 

If(
CountRows(Filter(Expanded, ????)) > 0,
CountRows(Filter('Child Data source', ThisItem.Object_Identifier in ProcessIsUsedToDeliverTheseServices))*32,
0
)

What I'm trying to do here is: if the parent's item's identifier is in the collection, the height of the child gallery is some positive number. Otherwise its 0 (minimized). However, as you can see I can't figure out a way to reference parent item data, hence the ????. There's no Parent.ThisItem. Is there another way I can do this? Thanks.

Categories:
I have the same question (0)
  • Drrickryp Profile Picture
    Super User 2024 Season 1 on at

    @Steve130 

    Are you using GroupBy() in the parent gallery?

  • Steve130 Profile Picture
    18 on at

    No, would that help? If it returns the data table in a different order, I'm not sure how it would help me.

  • Drrickryp Profile Picture
    Super User 2024 Season 1 on at

    @Steve130 

    Most of the applications I have seen have used GroupBy and then have expand and contract the subgallery.  Shane Young has a new video that may help you though.  https://www.youtube.com/watch?v=VNnaymeBN7g 

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 717 Most Valuable Professional

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 329 Super User 2025 Season 2

#3
Power Platform 1919 Profile Picture

Power Platform 1919 268

Last 30 days Overall leaderboard