cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
andyolb28 Advocate IV
Advocate IV

Clear/ Reset a SharePoint Form

Hey, how can I reset a SharePoint Form inklusive Lookup/Dropdownfields with a button? NewFrom and Reset Functions doesn’t work...
1 ACCEPTED SOLUTION

Accepted Solutions
Community Support
Community Support

Re: Clear/ Reset a SharePoint Form

Hi @andyolb28 ,

 

You could try to set below formula in the OnCancel property of SharePointIntegration control, then you need to select the "X" button on the upper right corner to achieve this:

NewForm(Form1)

Capture.JPG

 

Regards,

Mona

Community Support Team _ Mona Li
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

9 REPLIES 9
Microsoft
Microsoft

Re: Clear/ Reset a SharePoint Form

Hi @andyolb28 ,

For forms, you can try ResetForm() first to see if it gets the result you're looking for.

For targeted controls inside forms, these typically only respond to Reset() commands executed within their scope (i.e. from a control that is also inside the form.)  You could add a custom card to the form and put a button in there with a Reset() command for the specific controls in the form, but I find the older Reset: property method much easier.

To demonstrate;

Add a button outside the form and set it's OnSelect: property to

UpdateContext({resetControls: true});UpdateContext({resetControls: false})

Then set all relevant controls Reset: property to

resetControls

When the button is pushed, each control will then reset to its Default: property.  

 

Hope this helps,

RT

andyolb28 Advocate IV
Advocate IV

Re: Clear/ Reset a SharePoint Form

Thx for your answer, I think the default value must be value from the lookup field, right? Is it possible to clear the field like when you create an item?

Highlighted
Dual Super User
Dual Super User

Re: Clear/ Reset a SharePoint Form

Hi @andyolb28 

 

How have you created this SP Form?

 

Is this a standalone PowerApp or a SharePoint customized form with PowerApps?

 

Have you unlocked any of the data cards within the form control and created dropdowns and lookups?

andyolb28 Advocate IV
Advocate IV

Re: Clear/ Reset a SharePoint Form

I created a SharePoint Form. I created the lookups in SharePoint.
Dual Super User
Dual Super User

Re: Clear/ Reset a SharePoint Form

Hi @andyolb28 

 

So when does the form not reset for you?

 

Share screenshot with details

Community Support
Community Support

Re: Clear/ Reset a SharePoint Form

Hi @andyolb28 ,

 

Insert a button control and set its OnSelect property to:

NewForm(SharePointForm1)

I just tested this and it works for me. Although it will set all the fields in form control to blank and you will create a new item. 

 

If this does not meet your requirement, please explain more details.

 

Regards,

Mona

Community Support Team _ Mona Li
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
andyolb28 Advocate IV
Advocate IV

Re: Clear/ Reset a SharePoint Form

Why i add that button it will work in preview mode but that is happening on sharepoint online:

https://youtu.be/s5H1t0DK_xc

 

 

Community Support
Community Support

Re: Clear/ Reset a SharePoint Form

Hi @andyolb28 ,

 

Have you checked with other web browsers?

 

Regards,

Mona

Community Support Team _ Mona Li
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Community Support
Community Support

Re: Clear/ Reset a SharePoint Form

Hi @andyolb28 ,

 

You could try to set below formula in the OnCancel property of SharePointIntegration control, then you need to select the "X" button on the upper right corner to achieve this:

NewForm(Form1)

Capture.JPG

 

Regards,

Mona

Community Support Team _ Mona Li
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

Helpful resources

Announcements
MBAS Gallery 2020

MBAS Gallery 2020

Watch Microsoft Business Applications Summit sessions on-demand.

firstImage

New Ranks and Rank Icons released on April 21!

The time has come: We are finally able to share more details on the brand-new ranks coming to the Power Apps Community!

Power Platform 2020 release wave 1 plan

Power Platform 2020 release wave 1 plan

Features releasing from April 2020 through September 2020

Top Solution Authors
Top Kudoed Authors
Users online (6,937)