Skip to main content

Notifications

Community site session details

Community site session details

Session Id :
Power Apps - Building 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:
  • Calcioscacchi Profile Picture
    413 on at
    Refreshing my dataset resets my texinputs inside the Gallery!
     
    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. 
  • Mark Nanneman Profile Picture
    989 Super User 2025 Season 1 on at
    Refreshing my dataset resets my texinputs inside the Gallery!
    @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)})
  • Suggested answer
    timl Profile Picture
    35,193 Super User 2025 Season 1 on at
    Refreshing my dataset resets my texinputs inside the Gallery!
    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.

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

Paul Stork – Community Spotlight

We are honored to recognize Paul Stork as our July 2025 Community…

Congratulations to the June 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 > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 791 Most Valuable Professional

#2
MS.Ragavendar Profile Picture

MS.Ragavendar 410

#3
mmbr1606 Profile Picture

mmbr1606 275 Super User 2025 Season 1