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 / Refresh variable befor...
Power Apps
Answered

Refresh variable before displaying it in text box

(0) ShareShare
ReportReport
Posted on by

Hello! 

On my home screen i am setting "HoursWeek", which calculates the hours at work already conducted this week. It is set at the on visible property of the home screen. It is also displayed on the home screen. However, I am using it a second time. I have a button that starts a flow and adds hours to the sharepoint list. Once the hours are added to the list, the HoursWeek variable should theoretically increase. What i thought of to achieve that: Use Set(HoursWeek;"formula") again. The problem: The push of the button increases the number of hours via flow, navigates to a new site, where the new number of hours should be displayed. I think the navigation is faster than the flow. So once navigated, the on visible property of the new screen set the variable again, but as the flow is not finished yet, it doesnt add the new hours to the numbers. So, the old value of the variable is displayed in the text box of the new screen. What can i do to have the refreshed and updated number displayed? Thanks a lot for your help!

Categories:
I have the same question (0)
  • Verified answer
    timl Profile Picture
    36,411 Super User 2025 Season 2 on at

    Hi @Anonymous 

    When you say that the button naviagates to a new site, do you mean that it navigates to a new screen, or does it navigate to a different app?

    If the user remains in the same app, one option would be to update your variable manually before calling your flow...

    Set(HoursWeek; HoursWeek + HoursToAdd)

    You could then move your orignal Set statement from the OnVisible property of your screen to the OnStart property of your app. That way, your Set statement won't reset HoursWeek to the old value during the navigation.

    Another way to do this would be to call Set(HoursWeek;"formula") on a timer. By doing this, the variable would still show the old value following the navigation, but it'll show the new value as soon the Flow completes and the timer code runs.

     

     

  • Community Power Platform Member Profile Picture
    on at

    Hi @Anonymous how are you progressing with this? Was the above reply helpful?

     

    @Anonymous 

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 739 Most Valuable Professional

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 343 Super User 2025 Season 2

#3
Power Platform 1919 Profile Picture

Power Platform 1919 268

Last 30 days Overall leaderboard