cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Advocate III
Advocate III

App from SharePoint not resetting all fields when clicking "NEW"

Hi,

I have a PowerApps form created from SharePoint directly using the "Customer Form" option in a SharePoint list.

I've designed forms before, but this one is acting really strange

When I click the "New" button in SharePoint to launch a new form, I have the following rules set to my "SharePointIntegration"

 

Refresh('SharePoint List'); ResetForm('Form1'); NewForm('Form1')

 

The Text fields are reset; however all my dropdowns (which are pulled from other SharePoint lists) do not refresh. 

This does not occur on my other forms, which has exactly the same rules.

I've tried all the online resource possible with fail; any help at this stage is much appreciated

 

NOTE: I also tried to add a button within the app which applies the above code in the "ONSELECT" property, also without any success

 

Thanks

Luka  

1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted
Advocate III
Advocate III

Re: App from SharePoint not resetting all fields when clicking "NEW"

Hi again @v-xida-msft ,

so the solution that worked for me was as follows:

Change the "Reset" property for all my dropdown fields

code as follows: 

If('formname'.Mode = FormMode.New,true,false)​

This solved my problem.

Thanks for your inputs and suggestions though, luckily i didnt have to go down that road and redesign the entire thing 😃

View solution in original post

10 REPLIES 10
Highlighted
Super User III
Super User III

Re: App from SharePoint not resetting all fields when clicking "NEW"

@Luka84
You can manually RESET the dropdowns by placing some code like this at the end of your SharePointIntegration code

Reset(Dropdown1);Reset(Dropdown2);Reset(Dropdown3);

The code above will make your dropdowns display whatever is in their DEFAULT property.

—-
Please Accept as Solution if this post answered your question so others may find it more quickly. If you found this post helpful consider giving it a Thumbs Up.
Highlighted
Advocate III
Advocate III

Re: App from SharePoint not resetting all fields when clicking "NEW"

 Many thanks for responding back so fast.

I tried that but it doesn't work, which is also ridiculous??

Ultimately, the Reset Form should kick off a reset like it does to my other apps - could this issue be related to a certain bug? 

Come to think about it, Powerapps has been behaving differently over the past couple of days, My forms take double the time to load and save, functions suddenly stop working...Could it be Microsoft related?

Highlighted
Super User III
Super User III

Re: App from SharePoint not resetting all fields when clicking "NEW"

@Luka84 

ResetForm should also work if the dropdowns are inside of a form object.

 

Two questions:

  1. Did the reset ever work?
  2. What code is currently in the Default property of your dropdown?

 

---
Please click "Accept as Solution" if my post answered your question so that others may find it more quickly. If you found this post helpful consider giving it a "Thumbs Up."

 

Highlighted
Community Support
Community Support

Re: App from SharePoint not resetting all fields when clicking "NEW"

Hi @Luka84 ,

Do you mean that all Text fields are reset within your Edit form, but the Dropdown controls are not?

 

Based on the issue that you mentioned, I have made a test on my side, and don't have the issue that you mentioned. As an fixed solution, I think a global variable could achieve your needs.

 

I have made a test on my side, please consider take a try with the following workaround:

Set the OnNew property of SharePointIntegration control to following:

Refresh('SharePoint List');
ResetForm('Form1');
NewForm('Form1');
Set(IsReset, false);
Set(IsReset, true);

Set the Reset property of the Dropdown controls/ComboBox controls in Edit form to following:

IsReset

 

Please consider take a try with above solution, then check if the issue is solved.

 

Best regards,

Community Support Team _ Kris Dai
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Highlighted
Advocate III
Advocate III

Re: App from SharePoint not resetting all fields when clicking "NEW"

Hi @mdevaney 

Thank you for your response

unfortunately, I developed the app really quickly and never actually tested it until it was done

I've decided to recreate the entire app in a standalone canvas instead of starting it from SharePoint - hopefully this will be an advantage and I wouldn't run into any similar issues

Will keep you posted 😃

Highlighted
Advocate III
Advocate III

Re: App from SharePoint not resetting all fields when clicking "NEW"

Hi @v-xida-msft ,

Your suggestions makes total sense, something I've actually tried to do 2 days ago but what was happening is that the field would actually reset but remain locked - it's like the value is reset but the field doesn't really reset. 

I'll be recreating the app from scratch and test it along the way to make sure this doesn't happen and probably identify the part causing it. Thank you once again for your help !!

Highlighted
Community Support
Community Support

Re: App from SharePoint not resetting all fields when clicking "NEW"

Hi @Luka84 ,

Could you please share a bit more about the " it's like the value is reset but the field doesn't really reset"? What do you mean?

Do you mean that the available options within the Dropdown box are not updated from your other SP Lists?

 

If you also want to refresh the available options under the Dropdown boxes, please consider take a try with the following workaround:

Set the OnNew property of SharePointIntegration control to following:

Refresh('SharePoint List');
Refresh('Other SharePoint List1');  // Add this formula to refresh other SP List data sources in your app
Refresh('Other SharePoint List2');
Refresh('Other SharePoint List3');
...
...
ResetForm('Form1');
NewForm('Form1');
Set(IsReset, false);
Set(IsReset, true);

 

Best regards,

Community Support Team _ Kris Dai
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Highlighted
Advocate III
Advocate III

Re: App from SharePoint not resetting all fields when clicking "NEW"

@v-xida-msft ,

Sounds like a feasible solution, let me give it later this evening and get back to you

Thank you for your persistence to help, means a lot 😃

Highlighted
Community Support
Community Support

Re: App from SharePoint not resetting all fields when clicking "NEW"

HI @Luka84 ,

Have you taken a try with the solution I provided above?

Have you taken a try to re-create your custom form in your SP List?

 

If the solution I provided above is helpful in your scenario, and the issue is solved, please consider go ahead to click "Accept as Solution" to identify this thread has been solved.

 

Best regards,

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

Helpful resources

Announcements
Community Conference

Power Platform Community Conference

Check out the on demand sessions that are available now!

Watch Now

Experience what’s next for Power Apps

See the latest Power Apps innovations, updates, and demos from the Microsoft Business Applications Launch Event.

Power Platform ISV Studio

Power Platform ISV Studio

ISV Studio is designed to become the go-to Power Platform destination for ISV’s to monitor & manage published applications.

secondImage

Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

Top Solution Authors
Top Kudoed Authors
Users online (7,852)