web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / Reset fields when user...
Power Apps
Unanswered

Reset fields when user saves

(0) ShareShare
ReportReport
Posted on by

I have some fields that appear depending on the choice that the user makes and another field if it has "0" the same reset, and I would have another option also if the user selects a checkbox resets other fields too ...

 

The problem is that I don't want to use the "reset" property of the fields, but only reset if the option is selected, if the field "x" is with "0" and if a specific checkbox is selected

 

And I also don't see the need to use the condition for this, I say, "If" ...

 

What better way to do that?

Categories:
I have the same question (0)
  • LRVinNC Profile Picture
    2,297 on at

    I'm not sure exactly what you mean when you say you don't want to the reset property of the fields, but here is how I would do this.

     

    I would define a global variable, say ResetSwitch, with an initial value of false (Set ResetSwitch, false). 

    For all the fields you want to reset when your condition is met, put simply ResetSwitch in the Reset property.

    Then in the OnChecked property of the checkbox, I would have an If to test field x for 0  something like this depending on the data type, If(fieldx = "0", Set(ResetSwitch, true)).  

     

    So when they check the box, if field x is 0, then ResetSwitch will be set to true which will cause the fields in which you have ResetSwitch entered in the Reset property to in fact Reset.  

    You'll need to find the best spot to clear your switch with Set(ResetSwitch, false).  I would definitely do it in the OnUncheck action but you may also need to clear elsewhere.

     

    They are probably other ways, but this is the way I have handled it in the past.

     

  • Gorilla_8 Profile Picture
    on at

    @LRVinNC 

     

    Thanks for the response! So...I thought of variable too...

    But I'm in the struggle to think of a better way to reset all types of fields mentioned, you know?

     

    I'm not saying that you didn't help me, that's not it, I'm sorry if I expressed myself wrong about it, quite the contrary, all help is welcome!

    What I think you didn't understand is that I don't want to use the field's "reset" property when the user uses a dropdown and depends on that choice he resets another field (in this way I meant)

     

    It can use the "reset" property of fields only after saving, not depending on and other fields and instantly reset

     

    I'm using the "patch" function to save

     

  • Gorilla_8 Profile Picture
    on at

    @LRVinNC 

     

    Like this:

    erro3.gif

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Congratulations to the July Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 358 Most Valuable Professional

#2
11manish Profile Picture

11manish 214 Super User 2026 Season 2

#3
Mohsin Ali Profile Picture

Mohsin Ali 185

Last 30 days Overall leaderboard