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 / A Different Popup for ...
Power Apps
Answered

A Different Popup for each Gallery Item

(0) ShareShare
ReportReport
Posted on by 11

How can I add a different popup to each gallery item? I want to be able to select gallery list item  row 1 and get pop up item “a” then select gallery item row 2 and get pop up item “b”. Currently I get the same pop up for each row. 

Categories:
  • CNT Profile Picture
    10,921 Super User 2024 Season 1 on at

    @lisakristene What do you mean by a pop up? A screen-shot word make up for a 1000 words!

     

    Please remember to give a 👍 and accept my solution as it will help others in the future.

  • TheRobRush Profile Picture
    11,128 Moderator on at

    assumign the gallery is always changing you would need to do something like the contents of your popup are a switch and they do

    Switch(ThisItem.Title,
     //Displays Message for First Item
     Last(FirstN(SourceName,1)).ID,
     "This is a Pop-Up for Item 1",
     Last(FirstN(SourceName,2)).ID,
     "This is a Pop-Up for Item 2",
     Last(FirstN(SourceName,3)).ID,
     "This is a Pop-Up for Item 3",
     Last(FirstN(SourceName,4)).ID,
     "This is a Pop-Up for Item 4")
    

     

    and you just continue that on and on for however many different popups there are.

  • lisakristene Profile Picture
    11 on at

    Thank you for responding. I can’t screenshot because it has government information, but basically I want if I have a gallery of events listed like meeting 1, 2, 3, etc., then when I click meeting event 1 it has a pop up window outside the gallery with all the event info and pictures. Then click meeting event 2 and I get a different pop up window with all that information for that event. So far I have created the popups, but I can only add it to the first event in my gallery and then it pops up for all other events. I hope that makes sense. 

  • TheRobRush Profile Picture
    11,128 Moderator on at

    So basically you want a pop up /outside the gallery/ to contain all the info for the last item you clicked? What I would recommend its this.

     

    Change your pop up to a gallery instead of whatever it currently is.

     

    Add to your gallery items clickable button (along with whatever you have there that makes the pop up appear)

    ClearCollect(itemFocus, ThisItem)

    then point the popup gallery to itemFocus as the items property

     

  • CNT Profile Picture
    10,921 Super User 2024 Season 1 on at

    @lisakristene yourGallery.Selected will give you the currently selected Item in the Gallery irerspective of how many items are there and which one you have selected. You can use that to display the required info in your pop up.

     

    Please remember to give a 👍 and accept my solution as it will help others in the future.

  • lisakristene Profile Picture
    11 on at

    I apologize for being a novice, but I don’t quite understand what you are saying to do. Are you able to explain in further detail for someone with an elementary education in PowerApps? Thank you. 

  • Verified answer
    mmollet Profile Picture
    3,187 on at

    Each 'row' in your gallery is in fact an object with the fields that you set up in the data source you connected to that gallery. 

    Data Source: SP List called People

    Fields: firstname, lastname, age, height, sex, etc...

     

    The gallery shows each person as a row and that row, referenced by using 'ThisItem' inside that row/card, of the gallery will allow you to access that ojbects fields such as its name, age, height, etc. What you can do is utilize a collection or a variable to store that object so that it is accessable outside the gallery like this:

     

    OnSelect Property of the item in the gallery set to one of the following...

    Set(varPerson, ThisItem) -> varPerson.FirstName would return the name for that row/person.

    or

    ClearCollect(currPerson, ThisItem) -> First(currPerson).FirstName would return the same as above.

     

    Once you have this you can build out a 'pop-up' screen as you mentioned that is outside the gallery and shows more info by using the objects fields that you just saved. Does this make any more sense? 

  • lisakristene Profile Picture
    11 on at

    Thank you! This finally set off the lightbulb! I appreciate your help!

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

Leaderboard > Power Apps

#1
11manish Profile Picture

11manish 396 Super User 2026 Season 2

#2
Mohsin Ali Profile Picture

Mohsin Ali 323

#3
WarrenBelz Profile Picture

WarrenBelz 193 Most Valuable Professional

Last 30 days Overall leaderboard