Hello
I have various input controls (combobox, text input and date picker) in a gallery, which already have default values.
How can users reset individual fields to clear some but not all data in a gallery record, using OnSelect button?``
Thanks in advance
Solved! Go to Solution.
Hi!
The patch function update records, thats correct. "Erasing" data is also an update operation but with blank values. So it´s basically the same process as when you want to update a column with "real" data. With the formula provided earlier, you update the record with blank values.
BR
Pontus
Hi @Englishweb!
You can use the Reset function within the gallery to set the controls to their default value. E.g. Reset(DatePicker2). Just add the specific controls to your OnSelect formula and those will be reset.
BR
Pontus
Hello @pontusofsweden
Thank you for your reply. Unfortunately this doesn't work in my case because the default value IS the saved value.
So I need a way to clear certain cells from the datasource (Excel on OneDrive), but not the whole record (row).
Any suggestions?
Thanks
Hi!
Ok, so you want to clear the values from the datasource..then it´s more clear 🙂 The ordinary way is to use the Patch functionality within the gallery. Just change the name to your datasource and field names.
Patch(Datasource,ThisItem,{Field1:"",Field2:""}) etc...
BR
Pontus
Hello @pontusofsweden
I'm confused - I'm using Patch to save the data to a datasource and I would like to add a button that allows the user to delete the same data from the datasource when the task has been completed.
How can patch do this?
Sorry if I'm being really stupid here!
Hi!
The patch function update records, thats correct. "Erasing" data is also an update operation but with blank values. So it´s basically the same process as when you want to update a column with "real" data. With the formula provided earlier, you update the record with blank values.
BR
Pontus
hello @pontusofsweden
My fault! I misread the "" blank values. Your solution works perfectly!
Thanks for your help and clear explanations.
Hi!
Glad to help 🙂
BR
Pontus
User | Count |
---|---|
222 | |
97 | |
95 | |
55 | |
34 |
User | Count |
---|---|
274 | |
108 | |
106 | |
64 | |
60 |