I have a gallery includes one field and it is a checkbox showing the options from a SharePoint choice column. I do not have a form on my screen. When a button is clicked on the screen, a call is made to a powerautomate flow to upload the document to a document library and then reset the fields on the screen. The reset works fine for all fields EXCEPT for the gallery that contains the one checkbox. How can I get the checkbox field to reset?
You are correct. There was no need for that to be in the default field. I removed it and it is working as expected. Thanks for all your help!
How are you setting that? It is going to reflect whatever value in in that record when you reset. So if ThisItem.Value is true, then a reset will reset your checkbox to "checked", if it is false, then it will reset it to unchecked.
I have the default property of the checkbox as the value in the collection: ThisItem.Value in colDocType.Value, which helps ensure that I have the correct items to pass to the powerapp. Do I need to change this?
Keep in mind that resetting ANY control in PowerApps will reset it back to the Default properties. So, resetting a checkbox does not mean make it "unchecked", it means reset to the Default property value.
For example, if your default was set to "true", then when the control resets, it will reset to being checked. If the default is set to false, then the control will reset to unchecked.
All that said...what is your default property on the checkbox?
I tried that. My screen has a gallery on it and within the gallery it has one item and that is a checkbox. The button that kicks off the flow and do other things, has the two update context within it referencing "resetInputField" which is the same language attached to the check box's Reset property. The other fields on the screen are reset, but the gallery and the checked items still retain the check. I must be missing something.
Add the following after your flow is completed:
UpdateContext({lclReset: true}); UpdateContext({lclReset: false})
Then set the Reset property of your Checkbox to: lclReset
I hope this is helpful for you.