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 Apps
Answered

undefined

(0) ShareShare
ReportReport
Posted on by 7

Hello, 

New to the community, also new to Powerapps.

I have an app with two galleries connected to two different sharepoint lists.

On select each one populates a 3rd and 4th gallery respectively. 

I want to stack the 3rd and 4th gallery on top of each other and only have the current one visible based on the selection of gallery 1 or 2. Hope this makes sense. Thank you in advance. 

Categories:
I have the same question (0)
  • Verified answer
    LaurensM Profile Picture
    12,516 Moderator on at

    Hi @GaFire,

     

    First of all, welcome to the community 😊🎉

     

    As I understand your question, you have 2 parent galleries in the same screen between which the user can swap and select items. Galleries 3 and 4 are connected to the previous parent galleries respectively and stacked on top of each other. When they select an item in Gal1, they want to see Gal3; When they select an item in Gal2, they want to see Gal4. Is this correct?

     

    To achieve this, we will need to keep track of which gallery is selected / is in focus. The OnSelect of the parent galleries will need to update a variable to keep track of the focus:

    //OnSelect of gallery1:
    UpdateContext({varGalFocus: "Gal1"})
    
    //OnSelect of gallery2:
    UpdateContext({varGalFocus: "Gal2"})

     

    The Visible properties of Gal3 and 4 will depend on the variable value (Visible of those galleries):

    //Visible of Gallery3:
    varGalFocus = "Gal1"
    
    //Visible of Gallery4:
    varGalFocus = "Gal2"

     

    If this solves your question, would you be so kind as to accept it as a solution.

    Thanks!

  • GaFire Profile Picture
    7 on at

    Worked perfectly!! Thank you! This one was driving me crazy!

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

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Congratulations to the June Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 305 Most Valuable Professional

#2
11manish Profile Picture

11manish 212

#3
Valantis Profile Picture

Valantis 167

Last 30 days Overall leaderboard