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

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / Linking 2 galleries on...
Power Apps
Answered

Linking 2 galleries on different screens

(1) ShareShare
ReportReport
Posted on by 6
Hi,
 
I am creating a staff directory using Lists and Power Apps.
My Home Screen has a gallery 'glyNewStaff' which shows our staff in descending order from start date.
The second screen is called 'Search for a staff member' and this has a gallery 'glyEmployeelist' which pulls data from the same source but can be filtered in various ways, e.g. by service, and populates text input boxes to the right of the gallery to show a selected staff member's details.
 
I want to link 'glyNewStaff' to 'glyEmployeelist' so that when a staff member on 'glyNewStaff' is selected, it will navigate to the 'search for a staff member screen' and show that staff member's details on the page and in 'glyEmployeelist'.
 
Having some issues with this. Please could you help?
 
Thank you
Categories:
I have the same question (0)
  • Suggested answer
    Michael E. Gernaey Profile Picture
    53,969 Moderator on at
    Hi,
     
    Please do this, and I am answering based on what you gave and its very limited.
     
    1. Make sure that both Galleries have the same source, which you said it is so thats good
    2. On the Second Gallery, in the Default you need to do this (and do this even though it will seem broken at first)
    in Default put _RecordSelectedFromScreen1
     
    3. Now go back to Screen 1 (Home)
    Add a button or icon (if you dont have this already) that will allow you to Navigate to Screen 2 when pressed
     
    4. In the OnSelect of that button/icon put
     
    Navigate(Screen2, Transition.None, { _RecordSelectedFromScreen1: Gallery1Name.Selected });
     
    This will pass the Selected record as a Context Variable, NOT a global which is better
     
    When it navigates, it will pick up that _RecordSelectedFromScreen1 is set to a Row in the DataSource, which is the same as the Gallery 1 Source
     
    And bingo it will select that row.
     
    You can also, do in the Default
     
    If(!IsBlankOrError(_RecordSelectedFromScreen1), _RecordSelectedFromScreen1)
     
    This will then ONLY select the correct row If an Item was passed (because thats what you are passing is a record item) or not.
     
     
  • JB-09080811-0 Profile Picture
    6 on at
    Thank you so much for your help FLMike. Really appreciate it, it works perfectly!

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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Users!

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Congratulations to the March Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
11manish Profile Picture

11manish 530

#2
WarrenBelz Profile Picture

WarrenBelz 459 Most Valuable Professional

#3
Haque Profile Picture

Haque 314

Last 30 days Overall leaderboard