Question

I am testing data save and clear the text input fields. When I click on submit button, I want to save all text input data to SharePoint list and navigate to the same original screen.

How can you clear text input fields after you submit the data?

After I press submit it reloads the same page with the old values in the text boxes.

Was it helpful?

Solution

If you want to leave the controls empty after submitting, unlock the controls and then delete the values under Default properties, or it will return the default values even after being reset.

The form has a Reset function to reset itself in the OnSuccess property under ACTION by default. You can just add one more button and use SubmitForm function with it:

SubmitForm(SharePointForm1);

Please note that the DefaultDate values for Date picker controls will not be erased.

enter image description here

OTHER TIPS

Try using below after you submit the SharePoint data:

ResetForm(<Form control name>)

Your complete formula on submit button will be something like:

SubmitForm(<Form control name>); ResetForm(<Form control name>)

Replace <Form control name> with the name of your actual form control.

If that doesn't work for you then try adding the same Reset function in OnSuccess property of your form control.

Microsoft documentation: Reset function in Power Apps

Licensed under: CC-BY-SA with attribution
Not affiliated with sharepoint.stackexchange
scroll top