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 / Have two click two tim...
Power Apps
Unanswered

Have two click two times on galery sometimes

(0) ShareShare
ReportReport
Posted on by 4

Dear all. Hope you are doing great.

 

I have a gallery that when I click on one of the gallery's items, other controls outside the gallery are updated, such as labels and images.
Sometimes I have to double click to update some of the controls. Some controls always update. When I click the second time, they all update correctly.

 

Items from the galery are on a Sharepoint List.

 

What could it be?

 

OnSelect of the galery

 

Set(_SelectedReqItem; ThisItem);;

 

 

OnSelect of selective button outside galery

 

If(ThisItem.Filter <> _RequestTypeFilter;
Set(_RequestTypeFilter; ThisItem.Filter))

 

 

Items from galery

 

Switch(_RequestTypeFilter;
"All";
Filter(TravelSystem_Requests; Requester = _EmailRequesterGlobal.Mail && (ReqStatus = "Pending" || ReqStatus = "Approved" || ReqStatus = "Declined"));
"Pending";
Filter(TravelSystem_Requests; Requester = _EmailRequesterGlobal.Mail && ReqStatus = "Pending" );
"Approved";
Filter(TravelSystem_Requests; Requester = _EmailRequesterGlobal.Mail && ReqStatus = "Approved" );
"Declined";
Filter(TravelSystem_Requests; Requester = _EmailRequesterGlobal.Mail && ReqStatus = "Declined" );
Filter(TravelSystem_Requests; Requester = _EmailRequesterGlobal.Mail && (ReqStatus = "Pending" || ReqStatus = "Approved" || ReqStatus = "Declined"))
)

 

 

Label outside galery

 

_SelectedReqItem.FirstApprover

 

 

I upload a screen as example to understand better.

screen.png
Categories:
  • LaurensM Profile Picture
    12,516 Moderator on at

    @andrelima82 is there a particular reason why you save the item to a variable when clicking on the gallery?
    You could use GalleryName.Selected.FieldName to populate the fields next to the gallery instead of referencing the variable. 

    Your mentioned label code would be:

    GalleryName.Selected.FirstApprover


    Additionally, make sure that all controls in the gallery have the code below in the OnSelect.

    Select(Parent)


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

  • andrelima82 Profile Picture
    4 on at

    I did this way "GalleryName.Selected.FirstApprover", but it stayed the same. I saved it to a variable because it wasn't working either.

    All controls inside the Gallery have the code "Select(Parent) in the OnSelect event. Thanks

  • LaurensM Profile Picture
    12,516 Moderator on at

    @andrelima82 I unfortunately am not able to recreate the issue.

    However, another possible fix could be 'resetting' the variable first before patching the new info. In your case this would be adding the following code to your OnSelect of the Gallery:

    //Force reset
    Set(_SelectedReqItem; Blank());;
    //Update info
    Set(_SelectedReqItem; ThisItem);;

     

  • andrelima82 Profile Picture
    4 on at

    It doesnt make any difference but I think I have an update.

     

    If I click at any control inside the Gallery like buttons or label, the issue does not happen. If I click in any empty space in the gallery then I have to click two times or even three times.

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 342 Super User 2026 Season 2

#2
M Bilal Khan Profile Picture

M Bilal Khan 258

#3
Mohsin Ali Profile Picture

Mohsin Ali 231

Last 30 days Overall leaderboard