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

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
Highlighted
Dual Super User III
Dual Super User III

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

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 

 

 

 

 

Highlighted
Dual Super User III
Dual Super User III

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
Community Conference

Power Platform Community Conference

Check out the on demand sessions that are available now!

News & Announcements

Community Blog

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

secondImage

Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

Community Highlights

Community Highlights

Check out the Power Platform Community Highlights

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