Skip to main content

Notifications

Community site session details

Community site session details

Session Id :
Power Apps - Building Power Apps
Answered

Data item not refreshing when switching between pages

(1) ShareShare
ReportReport
Posted on by 300
Need help troubleshooting an issue.  My canvas app has 3 pages. 
1. Page 1 is a Gallery of items, user selects an item to edit.  Datasource is a SharePoint list. When the user selects an item, a variable with the item ID is set
2. Page 2 uses Edit Form, with the item being the one selected on page 1.  There are several fields the user can update on this page.  When the form inputs are valid, the save button is enabled and the user can save the form.  To illustrate, one of the fields the user can edit on this page is called 'Status'.  
3. Page 3 uses Edit Form, with the same item being the one selected on page 1, or the item they were editing on page 2.  There are several fields the user can update on this page, they are different fields than the ones presented on page 2.  On this page, the field called 'Status' is read-only.  It's an editable field on page 2, a read-only field on page 3. 
 
Issue:  when a user changes the 'Status' value on page 2, saves the form, then goes to page 3, the read-only value presented in the 'Status' field is not showing the latest value that was saved when the user made the update on page 2.   
 
On page 3, I set the 'On Visible' property to Refresh(datasource).   This has not had any effect.   
 
Is there a way I can ensure the field values on page 3 reflect the values the user saved on page 2?  
  • Verified answer
    WarrenBelz Profile Picture
    146,552 Most Valuable Professional on at
    Data item not refreshing when switching between pages
    That is what I suspected - you would need to reset the Variable, however a better idea (which also addresses a few other potential issues) is to set a Variable when you select the record from the gallery (you may already do this)
    Set(
       gblRecord,
       ThisItem
    )
    and then have the Item of the Form
    LookUp(
       SPList,
       ID = gblRecord.ID
    )
    You will find this automatically takes care of refreshing once you update the data source.
     
    Please click Does this answer your question if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it a Like.
    MVP (Business Applications)     Visit my blog Practical Power Apps    Buy me a coffee
  • allan_t Profile Picture
    300 on at
    Data item not refreshing when switching between pages
    Thanks @WarrenBelz.  The Reset(formname) resets the form back to default values which I don't want to do, I want the form to refresh the values from the datasource.   
     
    In the form properties, the datasource is the SharePoint list.  The item property is the variable that stored the item ID when the user selected the item from gallery on page.  1
  • WarrenBelz Profile Picture
    146,552 Most Valuable Professional on at
    Data item not refreshing when switching between pages
    Hi  allan_t
    A couple of things here - you can also use Reset(FormName), but also what is the Item of the Form (is it a direct query on the data source) ?

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

🌸 Community Spring Festival 2025 Challenge 🌸

WIN Power Platform Community Conference 2025 tickets!

Markus Franz – Community Spotlight

We are honored to recognize Markus Franz as our April 2025 Community…

Kudos to the March Top 10 Community Stars!

Thanks for all your good work in the Community!

Leaderboard

#1
WarrenBelz Profile Picture

WarrenBelz 146,552 Most Valuable Professional

#2
RandyHayes Profile Picture

RandyHayes 76,287 Super User 2024 Season 1

#3
Pstork1 Profile Picture

Pstork1 65,928 Most Valuable Professional

Leaderboard