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 / Variables prior to load
Power Apps
Answered

Variables prior to load

(0) ShareShare
ReportReport
Posted on by Microsoft Employee

This seems like a really bad question in my opinion but I could not find any solution online.  Basically I want to set the position and visibility of buttons based on what user is using the app.  I made this work by defining the variables in the OnStart property of the app, however, this shows buttons before they are set to their designated visibilty and position.  The workaround I found was covering the screen with a box until the app is finished changing the variables.  I feel that this is a poor workaround but cannot figure out how to set the variables prior to the app loading.  Any advice or better solution would be greatly appreciated. 

Categories:
  • Verified answer
    RandyHayes Profile Picture
    76,299 Super User 2024 Season 1 on at

    @Anonymous 

    There are a couple of options you can explore:

     

    1) Change the Visible property of the controls to only be visible when certain items are valid in your App.  This can be done in many different ways - a very simple solution (may or may not apply to your scenario) is to move all your buttons to the very top of the screen (Y=0).  Apply your formula for setting the Y value based on the loaded user - if not loaded then set to 0.  Then set the Visible property to !(Y=0) This will return true if the Y value is not 0 and thus be visible.  So...once your formulas adjust the Y value, then your control will be visible.

     

    2) Add a Splash Screen to your app that will display until the data you want is loaded and then automatically go to the next/first screen.

     

    3) Play with the Delayed Load advanced feature to see if there is any impact on your timing of data loading. (don't know your specifics, so may or may not help)

     

    4) Oh I had another one in mind when I was typing the above and now it is gone from my mind...If I think of it again, I'll post back.

     

    EDIT: #5 (it's different than what I was thinking with #4 which I still don't recall)

    5) Disabled the "non-blocking OnStart rule" in the advanced features to make sure your OnStart completes.

     

    I hope some of the above is helpful for you or sparks some ideas.

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 271

#3
Mohsin Ali Profile Picture

Mohsin Ali 223

Last 30 days Overall leaderboard