Skip to main content

Notifications

Power Apps - Building Power Apps
Answered

How do I prevent buttons showing before user permissions are determined?

(0) ShareShare
ReportReport
Posted on by 771
With any app, you get the loading screen built into Power Apps, that shows a loading bar and whatever icon you choose for the app. That's fine. My issue is with the initial screen. I hide certain buttons based on the user's permissions. The problem is that all the buttons flash on the screen. Once the user's permissions are determined it will hide those buttons. Is there a way to prevent this from happening? I'm thinking that maybe I need to set a variable to hide the buttons from the start. Then when the permissions are determined set the variable to true? Is there a better way? I see a screen property for LoadingSpinner but I can't figure out what it does exactly.
Categories:
  • futr_vision Profile Picture
    futr_vision 771 on at
    How do I prevent buttons showing before user permissions are determined?
    Thanks. I am using the rectangle and the 'old school' spinner control and setting visibility to the variable. That works fine except it I get a flicker of the screen and controls before it executes. That's part of the reason I am exploring other options.

    Question about testing LoadSpinner.Controls. How do you test this on the home screen? In the app you start on a screen that is pre-loaded with the controls already rendered.
  • Verified answer
    MarkRahn Profile Picture
    MarkRahn 916 on at
    How do I prevent buttons showing before user permissions are determined?
    Hi @futr_vision,
     
    You could try using the "LoadingSpinner" property. It is used to display a loading indicator while data is being fetched or an operation is being performed.
     

    The LoadingSpinner property can have the following values:

    • LoadingSpinner.None: No spinner is displayed.

    • LoadingSpinner.Controls: A spinner is displayed only while controls are being loaded.

    • LoadingSpinner.Data: A spinner is displayed only while data is being loaded.

     

    Try using "LoadingSpinner.Controls" to see if that helps.

    One thing I have done in the past is to place Rectangle or other control such as a Label over the Front of all the Controls like this:

    - Label3:
        Control: Label
        Properties:
          Align: =Align.Center
          Fill: =RGBA(255, 255, 255, 0.7)
          Height: =Parent.Height
          Width: =Parent.Width
     
     
    Then you can set the Label's Visibility property to show and hide it.
     
    If I've answered your question or solved your problem, please mark this question as answered. This helps others who have the same question find a solution quickly via the forum search. If you liked my response, please consider giving it a Like.
     
    Thanks
    -Mark
  • ronaldwalcott Profile Picture
    ronaldwalcott 1,337 on at
    How do I prevent buttons showing before user permissions are determined?
    You can start the app with the buttons invisible or disabled and only enable them when you determine the permissions. 

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

November 2024 Newsletter…

November 2024 Community Newsletter…

Community Update Oct 28…

Power Platform Community Update…

Tuesday Tip #9 Get Recognized…

Welcome to a brand new series, Tuesday Tips…

Leaderboard

#1
WarrenBelz Profile Picture

WarrenBelz 143,867

#2
RandyHayes Profile Picture

RandyHayes 76,308

#3
Pstork1 Profile Picture

Pstork1 64,161

Leaderboard