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 / Refreshing my dataset ...
Power Apps
Suggested Answer

Refreshing my dataset resets my texinputs inside the Gallery!

(0) ShareShare
ReportReport
Posted on by 413
Hi there, 
 
1)I have a gallery linked to a Sharepoint List which works as input dataset.
2)The gallery contains a TextInput that I use to set some parameters to record in another list (target dataset)
3)In the TextInputs, the operator has to write some percentages.
4)I need to refresh the input dataset because tha materials could change and the operator who reads this informations must know it. So I setted a timer and every 5 mins the dataset is refreshed. 
 
 
The problem is that when I refresh the input dataset, the TextInputs is resetted to default value which is "". 
 
 
I don't want this: If my dataset is refreshed, TextInputs must stay still with the values that I've inserted before.
 
 
 
For example, If I set the TextInputs with 20, 20, 30, 15, 95, 5, then I Patch the informations in the target dataset, the TextInputs don't change and they remain valued as I setted. 
 
 
 
In 5 minutes the input dataset will be refreshed and the TextInputs are resetted to blank value:
 
 
But also If the input dataset is refreshed, I need this situation again:
 
 
 
 
 
 
 
 
 
 
 
 
 
 
Do you know some methods to avoid this behaviour?
 
 
Categories:
I have the same question (0)
  • Suggested answer
    timl Profile Picture
    37,212 Super User 2026 Season 1 on at
    One way to do this is to store the percentage values that the user enters in a collection.
     
    In the OnChange property of the percentage text input control, you would add the following:
     
    Collect(colPercentages, {colID: ThisItem.ID, Percentage: txtPercent.Text})
    
     You would then set the Default property of your text input control to the following. 
     
    LookUp(colPercentages, colID = ThisItem.ID).Percentage
     
    The text input control should then retain the value after a refresh.
  • Mark Nanneman Profile Picture
    993 Moderator on at
    @timl's suggestion is good.  You could also make Percentuale a column on the source database (if it isn't already) and set it to display the value you from the database as default.  Then you could set the "OnChange" property of the Percentuale TextInput control to Patch an update to the datasource for that record.  Something like "Patch(yourDataSource, ThisItem, {Percentuale: Value(Self.Text)})
  • Calcioscacchi Profile Picture
    413 on at
     
    Thanks for your replies. 
     
    Collecting the input data could be nice, but i'll put that in the button used to patch the values in the destination dataset in order to use the "ClearCollect" function.
     
    Putting something different to "" in Default Values could be tricky: I tried it previously in a similar way, and when I try to patch new values, sometimes it fails. I?ll keep you updated. 

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 Launch!

Jump in, show your community spirit, and win prizes!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Congratulations to the May Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
Valantis Profile Picture

Valantis 494

#2
WarrenBelz Profile Picture

WarrenBelz 352 Most Valuable Professional

#3
11manish Profile Picture

11manish 323

Last 30 days Overall leaderboard