cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Gorilla_8
Impactful Individual
Impactful Individual

CLEAN THE FIELD WHEN THE USER SAVES UNDER SOME CONDITIONS

I have several forms divided into tabs, with my SharePoint database

 

About the fields:

 

Some fields appear depending on the choices of another field, so I would like to clear the field or reset it only when the user saves and that specific condition is active.

 

For example:

 

There is a field with two choices:

 

Yes or No.

 

If the user chooses "Yes" a multiple line text field appears, and if he chooses "No" the field does not appear and will be reset or cleared when he saves (click on a button)

 

There is also another condition with Checkbox fields, if the user selects the specific option, clears or resets the field when he saves

 

I tried to use a variable to reset, but it does not clear the field, it saves the same way.

 

In my "SubmitButton" it has functions like "Patch", I don't know if it will influence anything.

 

Thanks for all the help!

22 REPLIES 22
JR-BejeweledOne
Super User
Super User

In your save button formula, before the patch statement, add an if statement for your reset.

 

If( field = "No", Reset(fieldname))



If you like this post, give it a Thumbs up. If it answered your question, Mark it as a Solution to enable other users find it.
Gorilla_8
Impactful Individual
Impactful Individual

@JR-BejeweledOne 

 

Thanks for the solution,

 

but when I edit an item the reset function does not work...

Is your text field a label or a text input?



If you like this post, give it a Thumbs up. If it answered your question, Mark it as a Solution to enable other users find it.
Gorilla_8
Impactful Individual
Impactful Individual

text input...

 

I tried with (NameOfTheField.Text)

JR-BejeweledOne
Super User
Super User

Does your text field have a formula in the 'Default' property?    It works when I do it.

 

 



If you like this post, give it a Thumbs up. If it answered your question, Mark it as a Solution to enable other users find it.
Gorilla_8
Impactful Individual
Impactful Individual

No, just PlainText(Nameofthefield)...

JR-BejeweledOne
Super User
Super User

So the Default property of the Text Input, it doesn't look like this?

 

DefaultFormula.png



If you like this post, give it a Thumbs up. If it answered your question, Mark it as a Solution to enable other users find it.
Gorilla_8
Impactful Individual
Impactful Individual

No, 

Gorilla_8_0-1612544558456.png

 

JR-BejeweledOne
Super User
Super User

Please share the whole formula.



If you like this post, give it a Thumbs up. If it answered your question, Mark it as a Solution to enable other users find it.

Helpful resources

Announcements
UG GA Amplification 768x460.png

Launching new user group features

Learn how to create your own user groups today!

Community Connections 768x460.jpg

Community & How To Videos

Check out the new Power Platform Community Connections gallery!

M365 768x460.jpg

Microsoft 365 Collaboration Conference | December 7–9, 2021

Join us, in-person, December 7–9 in Las Vegas, for the largest gathering of the Microsoft community in the world.

Top Solution Authors
Top Kudoed Authors
Users online (3,166)