Skip to main content

Notifications

Community site session details

Community site session details

Session Id :
Power Apps - Building Power Apps
Answered

Nested Gallery Records Edit

(1) ShareShare
ReportReport
Posted on by 640

Hello All,

 

I have 2 nested galleries.

 

The first gallery to display departments. 

The second gallery displays people associated with departments from the first gallery. 

 

Now I want to display a person's details based on the selection of the second gallery.  How to achieve this? 

 

For Example, I have this code on default selected items properly of the Combobox. {Result:LookUp('request_all',personid = PL_InnerGal.Selected.personid,FullName)}

 

This code gives me a blank value.

 

Any suggestions?

Thanks, 

 

  • omi18 Profile Picture
    640 on at
    Re: Nested Gallery Records Edit

    Hi @Ethan_R ,

     

    Thanks for the reply. 

  • Ethan_009 Profile Picture
    4,838 Super User 2025 Season 1 on at
    Re: Nested Gallery Records Edit

    Hi @omi18 ,

     

    I'm not sure with the datatype but as per the syntax, try the following:

     

    LookUp('Candidates',Person = SelectedPerson, ThisRecord.Person)

     

     

    Note: Assuming SelectedPerson is storing Person ID, if you are using entire record then use

    LookUp('Candidates',Person = SelectedPerson.Person, ThisRecord.Person)

     

    Since SelectedPerson hold entire record so retrieving its fields are done by dot '.' operator

    Hope this helps

  • omi18 Profile Picture
    640 on at
    Re: Nested Gallery Records Edit

    Hello @Ethan_R ,

     

    Thanks for your reply. 

     

    I am able to populate some fields on the details screen. But with a combo box, no luck. 

    I have this formula in the default selected items: {Result:LookUp('Candidates',Person = SelectedPerson,Person)}
    what I'm missing here? SelectedPerson is a variable. 


    Thanks,

    Omkar

  • Ethan_009 Profile Picture
    4,838 Super User 2025 Season 1 on at
    Re: Nested Gallery Records Edit

    Hi @omi18 ,

     

    So you are trying to Edit the Record:

    I think you are using Navigate function to go to details page.

     

    Do the following:

    //Method 1
    Use Set function to use variable scross multiple screens
    Then on the 'Details Screen' -> Item property of Form => use varSelectedPerson variable
    
    //Method 2
    Pass contextual variables directly when going to other screen
    
    Syntax => Navigate('Details Screen', NavigationType.None, {SelectedPerson: DepartmentGallery.Selected, SelectedDepartment: OuterGallery.Selected});
    
    Then you can use the variables on 2nd screen anywhere

     

    Hope this makes sense

  • omi18 Profile Picture
    640 on at
    Re: Nested Gallery Records Edit

    Hi @Ethan_R ,

     

    Thanks for your reply. I think I didn’t understand. 

    This is I have On Select property of the inner gallery. UpdateContext({SelectedPerson:PL_InnerGal.Selected.FullName,SelectedLead:PL_InnerGal.Selected.LeadFacilitator})

    But how to get value out of it? 

    Nested Gallery

    Here is the sample. The screenshot above is an example of a nested gallery. In gray color is the outer gallery, and if you click on the down arrow, it opens the inner gallery, which is in gradient color. Now If you click on the pencil icon of the inner gallery record, it opens the details page, which is the second screenshot. This should show all data related to the selected row from the inner gallery. 

     

    I'm using SQL views as a source. 

    Details Page

     

    Thanks,

    Omi18

  • Verified answer
    Ethan_009 Profile Picture
    4,838 Super User 2025 Season 1 on at
    Re: Nested Gallery Records Edit

    Hi @omi18 ,

     

    Don't use this as this will create confusion because although you selected inner Gallery for 1st Department for example, But the App already has Inner Gallery for other Departments as well.

    To overcome this: You need to ensure which Record is selected by inner Gallery corresponding to its Parent Department.

     

    Step 1: OnSelect of inner Gallery, enter the following code:

    UpdateContext({
     SelectedPerson: innerGallery.Selected,
     SelectedDepartment: DepartmentGallery.Selected
    });

     

    Note: Both variable holds full set of columns, you can specific if you want only ID of those items

     

    Use this variable wherever required on the current screen. To make it work within entire App. Use Set instead of UpdateContext

     

    Hope this helps

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

Paul Stork – Community Spotlight

We are honored to recognize Paul Stork as our July 2025 Community…

Congratulations to the June Top 10 Community Leaders!

These are the community rock stars!

Announcing the Engage with the Community forum!

This forum is your space to connect, share, and grow!

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 791 Most Valuable Professional

#2
MS.Ragavendar Profile Picture

MS.Ragavendar 410

#3
mmbr1606 Profile Picture

mmbr1606 275 Super User 2025 Season 1