cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
anupamdatt
Frequent Visitor

Form reset issue

I have done made offline bar code. Implementation process followed as given in below link

https://powerapps.microsoft.com/en-us/blog/implementing-offline-capability-in-your-app/

Although everything is working except my form is not getting reset. Specially Drop downs and One date field on form in which I have used 

Default = Text( Now(), "[$-en-US]dd-mmm-yyyy hh:mm" )

 

Code for submit button - on Select

If(Connection.Connected,SubmitForm(Form2); Refresh(Table1); ClearCollect(BarcodeCollection,Table1);
SaveData(BarcodeCollection,"DataInLocalStorage")
,
Collect(DataToBeAdded,{Barcode:DataCardValue8.Text, Date:DataCardValue11.Text,Press:Dropdown2.Selected.Value} ); SaveData(DataToBeAdded, "newDataInLocalStorage"));

Navigate(Browse_Screen,ScreenTransition.Cover)

 

Code for Form2 - On success

Refresh(Table1);NewForm(Form2); Navigate(Browse_Screen,ScreenTransition.Fade)

 

Code on browse screen for entering on to form for new record

OnSelect

NewForm(Form2);Navigate(SubmitData, ScreenTransition.None)

 

 

4 REPLIES 4
Jeff_Thorpe
Super User
Super User

Have your tried adding ResetForm() to your OnSelect?

 

OnSelect
NewForm(Form2); ResetForm(Form2); Navigate(SubmitData, ScreenTransition.None)

 



--------------------------------------------------------------------------------
If this post helps answer your question, please click on “Accept as Solution” to help other members find it more quickly. If you thought this post was helpful, please give it a Thumbs Up.

Thanks for reply. used 

NewForm(Form2); ResetForm(Form2); Navigate(SubmitData, ScreenTransition.None)

but its resetting all field except date field

Hi @anupamdatt ,

Is your data field a Date/Time or Text field?

If Date/Time - your Default should be Now().

If Date only, use Today()

 

Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.

 

Hi @anupamdatt ,

Just checking if you got the result you were looking for on this thread. Happy to help further if not.

Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.

Helpful resources

Announcements
UG GA Amplification 768x460.png

Launching new user group features

Learn how to create your own user groups today!

Community Connections 768x460.jpg

Community & How To Videos

Check out the new Power Platform Community Connections gallery!

M365 768x460.jpg

Microsoft 365 Collaboration Conference | December 7–9, 2021

Join us, in-person, December 7–9 in Las Vegas, for the largest gathering of the Microsoft community in the world.

Top Solution Authors
Top Kudoed Authors
Users online (1,809)