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 is Back!

We are excited to announce that Demo Extravaganza for 2021 has started!

MBAS on Demand

Microsoft Business Applications Summit sessions

On-demand access to all the great content presented by the product teams and community members! #MSBizAppsSummit #CommunityRocks

Power Apps June 2021

June Power Apps Community Call

Don't miss the call this month on June 16th - 8a PDT

Top Solution Authors
Top Kudoed Authors
Users online (27,765)