I have fields that hide or appear based on another field where the options are yes or no. Example: Additional Hours? Yes No…If yes is chosen the field appears and the value can be entered. I need a code that will clear that field if the user goes back and chooses no.
Subject: RE: Making a field Blank
Use an @If in your input translation formula.
Subject: RE: Making a field Blank
Please be a little more specific.
Subject: RE: Making a field Blank
oooh that was quite specific!You should not see this forum as a replacement for proper notes training really!
Subject: RE: Making a field Blank
Ooooh! You should keep your comments to yourself if you post is not going to help!
Subject: RE: Making a field Blank
excuse me? No need for rudeness especially if you need favours from people in this forum (i.e. answering your questions)!
Subject: RE: Making a field Blank
I have been on for awhile, but rudeness begats rudeness. I only needed help not your smart remarks. However, I did receive the help I needed from the others that responded.
Subject: Making a field Blank
put some code in the field’s InputTranslation formula
@If(field1 = “No”; “”; @ThisValue)
Subject: RE: Making a field Blank
Thank you Paul. I needed an example because what I wanted to try wouldn’t have worked.
Subject: RE: Making a field Blank
What about using the field’s onChange event?
Subject: RE: Making a field Blank
The input translation is more appropriate, if you ask me. As far as I understood it, the additional field is already hidden, after the user switched from “yes” to “no”, so all that is left to do is to prevent a value entered before from being saved.
If on the other hand the user would decide to switch back to “yes”, it would be handy to still have the value he originally entered. So I would suggest to slightly modify the formula to something like
@If(
@IsDocBeingSaved & field1 = “No”;
“”;
@ThisValue
)
You can’t do that using the onChange event.
Subject: RE: Making a field Blank
Thanks I will try that.