Skip to main content

Notifications

Community site session details

Community site session details

Session Id :
Power Apps - Building Power Apps
Answered

Automatically Hit Refresh Button on Start of the App

(1) ShareShare
ReportReport
Posted on by 317
Hello,
 
Into my App I have 2 buttons which shows counts from Shipped Date and Received Date fields (is not blank).
 
For some reason when I open the App, the count does not show up correctly.
 
And then I have a button called Refresh. Once I click the Refresh button, the count shows up correctly.
 
Is there a way, when users open the App, it automatically hits the Refresh button, rather than manually clicking it.
 
Please advise.
  • Prem4253 Profile Picture
    317 on at
    Automatically Hit Refresh Button on Start of the App
     
    Thanks!
  • Verified answer
    MS.Ragavendar Profile Picture
    2,185 on at
    Automatically Hit Refresh Button on Start of the App
     
    Its just a collection created.
     
    ClearCollect(collectionName,DataSource).
     
    One more thing, if you provided on visible of screen every time it will set the value.
     
     
    🏷️ Please tag me @MS.Ragavendar if you still have any queries related to the solution or issue persists.
    Please click Accept as solution if my post helped you solve your issue and help others who will face the similar issue in future.
    ❤️ Please consider giving it a Like, If the approach was useful in other ways.
  • Prem4253 Profile Picture
    317 on at
    Automatically Hit Refresh Button on Start of the App
     
    I applied the logic on OnVisible property of the Screen and it appears to be working. Thanks! for your help.
     
     
    Could you please advise what is colAccounts and Accounts mentioned in your post.
  • Verified answer
    MarkRahn Profile Picture
    1,049 Super User 2025 Season 1 on at
    Automatically Hit Refresh Button on Start of the App
    Hi,
     
    If you specifically want to click the button, you could put code in the OnVisible property of your Screen. The code to call the button would be something like:
         Select(Button1);
     
    Replace with your Button name.
     
    The OnVisible code will run when the Screen is displayed.
     
    This might get you what you are looking for in the short term.
     
    In the long term you may want to use the App - OnStart property to write code to populate a Collection that you can pull your counts from.
     
    You could also add a Timer to your Screen to automatically refresh the data after a certain interval.
     
    This community is supported by individuals freely devoting their time to answer questions and provide support. They do it to let you know you are not alone. This is a community.

    If someone has been able to answer your questions or solve your problem, please click Does this answer your question. This will help others who have the same question find a solution quickly via the forum search.

    If someone was able to provide you with more information that moved you closer to a solution, throw them a Like. It might make their day. 😊

    Thanks
    -Mark
     
     
  • Suggested answer
    MS.Ragavendar Profile Picture
    2,185 on at
    Automatically Hit Refresh Button on Start of the App
     
    There is property called Application  OnStart - when you set the value in the app on start the values will set automatically whenever the app is loaded. 
     
     
     
    🏷️ Please tag me @MS.Ragavendar if you still have any queries related to the solution or issue persists.
    Please click Accept as solution if my post helped you solve your issue and help others who will face the similar issue in future.
    ❤️ Please consider giving it a Like, If the approach was useful in other ways.

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

Michael Gernaey – Community Spotlight

We are honored to recognize Michael Gernaey as our June 2025 Community…

Congratulations to the May Top 10 Community Leaders!

These are the community rock stars!

Announcing the Engage with the Community forum!

This forum is your space to connect, share, and grow!

Leaderboard >