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.
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!
What you have to understand is how the Default formula on your text box is affecting this:
Your text box has this formula in the 'Default' property:
This means if 'ThisItem.NameOfTheField' is blank this will be blank and if 'ThisItem.NameOfTheField' has a value, this will have a value. Reset only sets a field back to it's default value. If the default value is not blank, then reset can't make it blank.
So you have to modify the text field's 'Default' formula or nothing is going to change.
Modify the formula in your text field 'Default' property:
'BI?Radio_3'.Selected.Value = "Yes", PlainText(ThisItem.NameOfTheField),
'BI?Radio_3'.Selected.Value = "No" And resetItem, ""