cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
WhatisPowerApps
Level: Powered On

How can I clear/reset selective DataCardValue inside the form?

How do I clear some input fields inside the form before submitting? I'm not looking for ResetForm().

 

I like to clear some fields inside the form. I'm trying to setup to clear some input fields based on one user input. Is there a way to setup it up? Reset(DataCardValue) doesn't work.

1 ACCEPTED SOLUTION

Accepted Solutions
Dual Super User
Dual Super User

Re: How can I clear/reset selective DataCardValue inside the form?

Hi @WhatisPowerApps 

 

If you want to reset a few controls inside the form, then you can create a variable to do so:
 
Control that will reset the DataCard's control: Eg. Button -> OnSelect -> Set(ResetControl,true);Set(ResetControl,false)
 
DataCard's control that will be reset: -> Reset property -> ResetControl
 
Here, ResetControl is a variable which holds the Boolean value and when it is true it will reset the conrol.
 
Hope this Helps!

If this reply has answered your question or solved your issue, please mark this question as answered. Answered questions helps users in the future who may have the same issue or question quickly find a resolution via search. If you liked my response, please consider giving it a thumbs up. THANKS!

View solution in original post

2 REPLIES 2
Highlighted
Super User
Super User

Re: How can I clear/reset selective DataCardValue inside the form?

the way I achieve this is to have a text input field placed inside the data card as well and make the actual field invisible.

 

I then create a variable and make this the part of the default text to the new field eg:

If(Isblank(Parent.Default),"VarText".Parent.Default)   /so the parent field to the form is blank it uses the variable field as the default text

 

Then in the default to the now invisible from field I set its Default to = The TextInput?.Text 

 

 

 

 

Dual Super User
Dual Super User

Re: How can I clear/reset selective DataCardValue inside the form?

Hi @WhatisPowerApps 

 

If you want to reset a few controls inside the form, then you can create a variable to do so:
 
Control that will reset the DataCard's control: Eg. Button -> OnSelect -> Set(ResetControl,true);Set(ResetControl,false)
 
DataCard's control that will be reset: -> Reset property -> ResetControl
 
Here, ResetControl is a variable which holds the Boolean value and when it is true it will reset the conrol.
 
Hope this Helps!

If this reply has answered your question or solved your issue, please mark this question as answered. Answered questions helps users in the future who may have the same issue or question quickly find a resolution via search. If you liked my response, please consider giving it a thumbs up. THANKS!

View solution in original post

Helpful resources

Announcements
thirdimage

Power Apps Super User Class of 2020

Check it out!

thirdimage

New Badges

Check it out!

thirdimage

Power Apps Community User Group Member Badge

Fill out a quick form to claim your user group badge now!

sixthImage

Power Platform World Tour

Find out where you can attend!

Power Platform 2019 release wave 2 plan

Power Platform 2019 release wave 2 plan

Features releasing from October 2019 through March 2020

SecondImage

Difinity Conference

The largest Power BI, Power Platform, and Data conference in New Zealand

Top Solution Authors
Top Kudoed Authors
Users online (5,445)