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 / Nested Gallery Records...
Power Apps
Unanswered

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, 

 

Categories:
I have the same question (0)
  • Verified answer
    Ethan_009 Profile Picture
    4,838 Moderator on at

    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

  • omi18 Profile Picture
    640 on at

    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

  • Ethan_009 Profile Picture
    4,838 Moderator on at

    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

    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 Moderator on at

    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

    Hi @Ethan_R ,

     

    Thanks for the reply. 

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