1

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.

2
  • Are you developing canvas app and using form control? Commented Dec 23, 2020 at 3:30
  • Yes, I am using canvas app and form control.
    – May Thu
    Commented Dec 24, 2020 at 4:05

2 Answers 2

1

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

0

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

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.