cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Data_Enthusiast
Post Patron
Post Patron

Open pop-up for selected Gallery item

Hi Power Apps Community,

Issue: I have a Power App which has a small information icon next to each Gallery item. When a user selects the icon, a pop-up is displayed showing additional information related to the selected Gallery item. The issue is that whenever I select the icon, a pop-up is shown for ALL the items instead of the selected item.

I am using the following in the OnSelect property of the icon:

If(Product = Title.Text, UpdateContext({Popup:true}), "");

I would appreciate any assistance on this.

Thank you in advance.  

1 ACCEPTED SOLUTION

Accepted Solutions

OnVisible of the Screen

UpdateContext({varShowPop:false})
 
In the Visible of the Icon inside the Gallery put:
If(ThisItem.IsSelected,!varShowPop,varShowPop)
------------

If you like this post, give a Thumbs up. Where it solved your request, Mark it as a Solution to enable other users find it.

View solution in original post

6 REPLIES 6
eka24
Super User III
Super User III

Try

If(Thisitem.IsSelected, UpdateContext({Popup:true}), "")

------------

If you like this post, give a Thumbs up. Where it solved your request, Mark it as a Solution to enable other users find it.

Hi @eka24 

I tried the script provided but all the items are still getting pop-ups.

The pop-up is a Label in the Gallery, so each item has one.

Wondering if I should create one Label which would be dynamic based on selection?

It depends on the objective of the Pop up. What do you want the Pop up to cover after you have selected, all or only the selected item or those not selected

------------

If you like this post, give a Thumbs up. Where it solved your request, Mark it as a Solution to enable other users find it.

Hi @eka24 

I would like to only have a pop-up shown for the selected item. 

So all items in the Gallery have a pop-up, but if I selected the icon for Item A, then only the pop-up for Item A should show. 

OnVisible of the Screen

UpdateContext({varShowPop:false})
 
In the Visible of the Icon inside the Gallery put:
If(ThisItem.IsSelected,!varShowPop,varShowPop)
------------

If you like this post, give a Thumbs up. Where it solved your request, Mark it as a Solution to enable other users find it.

View solution in original post

Hi @eka24 

Thank you! This worked 🙂

Helpful resources

Announcements
PA User Group

Welcome to the User Group Public Preview

Check out new user group experience and if you are a leader please create your group

secondImage

Demo Extravaganza Winner Announcement

Please join us on Wednesday, July 21st at 8a PDT. We will be announcing the Winners of the Demo Extravaganza!

V3_PVA CAmpaign Carousel.png

Community Challenge - Giveaways!

Participate in the Power Virtual Agents Community Challenge

Carousel 2021 Release Wave 2 Plan 768x460.jpg

2021 Release Wave 2 Plan

Power Platform release plan for the 2021 release wave 2 describes all new features releasing from October 2021 through March 2022.

Top Solution Authors
Top Kudoed Authors
Users online (2,670)