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 / Why do I have to doubl...
Power Apps
Answered

Why do I have to double-click for my filter pane to open?

(0) ShareShare
ReportReport
Posted on by 9

I created a filter pane that opens upon the click of a filter icon.  At first, I only needed to click it once, but lately, it's having me click twice to open.  

 

This is what I have on my OnSelect button:

If(PanelVis=false,UpdateContext({PanelVis:true}),UpdateContext({PanelVis:false}))

 

And what's odd is that it only happens the first time I click on the icon.  If I close it and try opening it again, it only requires one click.  Any thoughts on what could be causing this?

 

Thanks!

 

Categories:
  • RodCha Profile Picture
    216 on at

    Try 'Set' instead of 'UpdateContext':

     

    OnStart

    Set(PanelVis, false)

     

    Button

    If(PanelVis = false, Set(PanelVis, true), Set(PanelVis, false))

     

  • Verified answer
    Al_10 Profile Picture
    1,691 Super User 2024 Season 1 on at

    @kdsantoro 


    your filter pane visibility = (PanelVis) or visibility= (PanelVis =true)?
    i guess that it happens when your PanelVis has no value (neither true nor false).


    If(PanelVis<>true,UpdateContext({PanelVis:true}),UpdateContext({PanelVis:false}))

  • timl Profile Picture
    37,322 Super User 2026 Season 2 on at

    I'm pretty sure that @Alex_10 has given the correct answer here (ie - PanelVis is null/blank on the initial load of the screen). If you want to 'shortcut' the If statement, the following should also work.

     

    UpdateContext({PanelVis:!Coalesce(PanelVis, false)})

     

  • Drrickryp Profile Picture
    Super User 2024 Season 1 on at

    @kdsantoro 

    UpdateContext({PanelVis,!PanelVis })

    Will toggle the panel. Have the default view UpdateContext({PanelVis,true}) in the OnVisible property of the screen.

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 283

#3
Mohsin Ali Profile Picture

Mohsin Ali 221

Last 30 days Overall leaderboard