cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Helper II
Helper II

Reset form - only the specific fields

Hi Experts, 

 

I have to reset the form after submitting the form, but not to reset one particular field. 

 

Example: 

 

I am having the below field like

 

Class: 1 

Name : XX

Subject : XX 

 

After submitting the form the "Class" i don't want to reset the "Class" field but to reset the other fields. 

 

Is there any chances for that? 

 

Could someone help me on that? 

 

 

 

1 ACCEPTED SOLUTION

Accepted Solutions
Community Support
Community Support

Hi @nagoor ,

Do you want to reset a form but retain some fields value after you submit the form?
As the error you met before, the dacardvalue will become invalid after you submit the form.

So I suggest you not reset controls one by one after you submit the form.

I suggest you save the dacard's value as variable that you want to retain before you submit the form.

Then after you submit the form, make this field display the variable value instead of Parent.Default.

I've made a similar test for your reference:
In my test, I want to retain the Title field value.(DataCardValue47)

1)Unlock the Title field

2)set the Title textinput's Default:

If(IsBlank(varvar),Parent.Default,varvar)

3)set the submit button's OnSelect:

Set(varvar,DataCardValue47.Text);SubmitForm(Form5);ResetForm(Form5)

3108.PNG

 

Then at first the Title textinput is blank. After you click the submit button, you will save the value that you entered as a variable.

Then Title textinput will display the varaible value.

 

 

 

 

Best regards,

Community Support Team _ Phoebe Liu
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

6 REPLIES 6
Super User III
Super User III

HI @nagoor ,

You can simply reset the other controls individually - Reset(Name); Reset(Subject)

 

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.

@WarrenBelz 


Thanks for your response, Actually i tried with it and its not working. Also, the form is disabled after the submit form if we use it clear only the text input value 

 

Error1.png

Ok @nagoor ,

Set a Variable before form submit and reset the control you want left at that after the reset form.

 

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.

Community Support
Community Support

Hi @nagoor ,

Do you want to reset a form but retain some fields value after you submit the form?
As the error you met before, the dacardvalue will become invalid after you submit the form.

So I suggest you not reset controls one by one after you submit the form.

I suggest you save the dacard's value as variable that you want to retain before you submit the form.

Then after you submit the form, make this field display the variable value instead of Parent.Default.

I've made a similar test for your reference:
In my test, I want to retain the Title field value.(DataCardValue47)

1)Unlock the Title field

2)set the Title textinput's Default:

If(IsBlank(varvar),Parent.Default,varvar)

3)set the submit button's OnSelect:

Set(varvar,DataCardValue47.Text);SubmitForm(Form5);ResetForm(Form5)

3108.PNG

 

Then at first the Title textinput is blank. After you click the submit button, you will save the value that you entered as a variable.

Then Title textinput will display the varaible value.

 

 

 

 

Best regards,

Community Support Team _ Phoebe Liu
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

@v-yutliu-msft 

 

Thanks, for your Support..

 

Its done now... With your support 🙂 

I am having the same issue. How would I do it for multiple fields?

Helpful resources

Announcements
News & Announcements

Community Blog

Stay up tp date on the latest blogs and activities in the community News & Announcements.

Power Apps Community Call

Power Apps Community Call- January

Mark your calendars and join us for the next Power Apps Community Call on January 20th, 8a PST

PP Bootcamp Carousel

Global Power Platform Bootcamp

Dive into the Power Platform stack with hands-on sessions and labs, virtually delivered to you by experts and community leaders.

secondImage

Power Platform Community Conference On Demand

Watch Nick Doelman's session from the 2020 Power Platform Community Conference on demand!

Top Solution Authors
Top Kudoed Authors
Users online (4,854)