cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
WhatisPowerApps
Advocate II
Advocate 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

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
leyburn19
Memorable Member
Memorable Member

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 

 

 

 

 

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!

Helpful resources

Announcements
Power Platform Call June 2022 768x460.png

Power Platform Community Call

Join us for the next call on August 17, 2022 at 8am PDT.

Power Platform Conf 2022 768x460.jpg

Join us for Microsoft Power Platform Conference

The first Microsoft-sponsored Power Platform Conference is coming in September. 100+ speakers, 150+ sessions, and what's new and next for Power Platform.

Users online (3,454)