web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / Canvas controls with v...
Power Apps
Answered

Canvas controls with visibility false appear briefly before disappear

(0) ShareShare
ReportReport
Posted on by 44

Dear all,

 

I have a few controls on a canvas app I'd like to hide from some users. However, what I've noticed is that those controls would appear briefly before disappear. Any idea of why this is happening and how to solve it? Thanks. 

 

Bo 

 

Categories:
I have the same question (0)
  • Michael E. Gernaey Profile Picture
    53,392 Super User 2025 Season 2 on at

    Hello,

     

    Can you provide an image / video of the problem. Need a little detail related to what the screen is doing.

     

    Are you setting it invisible via a Context/Variable and if so when do you set it to false, so invisible is false before the screen loads.

    Cheers
    --------------------------------------------------------------------------------
    If I had answered your question, please mark your post as Solved
    If you like my post please give it a thumbs up
    Thanks
    Michael Gernaey MCT | MCSE | Expert | Ex-Microsoft
    https://gernaeysoftware.com

  • Tetralink Profile Picture
    64 on at

    What are you using? If you could provide the power fx code it’ll help troubleshoot and which property is this in. OnStart, or Visible property 

  • newbie101 Profile Picture
    44 on at

    Thanks for your help! The attached is the video recording. "Month" that appeared briefly and disappeared is a label  on the landing screen with Visibility set to be vDis <> "err". vDis is a global variable that is set in App OnStart with the condition that Set(vDis, If(a user is found in a list, "vie", "err")). Basically, what I am trying to achieve is to hide some controls if a user is not found in a list on SharePoint. 

  • Verified answer
    Michael E. Gernaey Profile Picture
    53,392 Super User 2025 Season 2 on at

    Hello,

     

    Ha, what's weird is if I watch the video one time I do see it happen, then after that it won't until I restart the video. 

     

    Ok, a couple things.

    1. For supportability and meaning, you should rename vDis to something like isInSharePointList or makeVisible and then the value should be true or false. It has more meaning based on the intent you are telling me it does

     

    2. I assume that vDis doesn't properly get set until you load the data and can check if the person is in the list. This means that vDis should have some default value, before you try to load the data, so that the controls have that default value. I suggest you make it false, meaning they are NOT visible until you are certain they should be, versus the other way around.

     

    3. So in AppOnStart, first line vDis = false("err" in your case), load the data, then set it to the final value, even if its just false("err")

     

    4. Sometimes this happens if controls are stacked, or accidentally overlapped in the UI, so make sure there is nothing overlapping to that control.

     

    Is this the only one that does it? If so then yeah thats weird, but its there is something with that specific label/control that is different than the rest, or in the backend (not your code) it just happens to somehow be stuck in some weird state all the time. You could even try removing it, and putting it back and see if that stops it.

    Cheers
    --------------------------------------------------------------------------------
    If I had answered your question, please mark your post as Solved
    If you like my post please give it a thumbs up
    Thanks
    Michael Gernaey MCT | MCSE | Expert | Ex-Microsoft
    https://gernaeysoftware.com

     

  • newbie101 Profile Picture
    44 on at

    Thank you for your help!  As explained above, I tried to use a global variable to achieve the goal of hiding some controls if a user is not found in a SP list. Another approach I tried is to use a context variable in the OnVisible property of the landing screen: UpdateContext({vcDis: If(a user is found in a list, true, false)}). The problem I ran into is that vcDis is always false regardless of whether the user is found. 

     

    In the attached file, you can see that the value of "CountRows(Filter(colUsr, usr = vUsr)) > 0" was false and then changed into true, but vcDis never change.

  • newbie101 Profile Picture
    44 on at

    Thanks! This reinforces the importance of a good habit of declaring variables and set default values. 

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

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 721 Most Valuable Professional

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 320 Super User 2025 Season 2

#3
Power Platform 1919 Profile Picture

Power Platform 1919 268

Last 30 days Overall leaderboard