How to clear field that is displayed only if a value in another field is selected

I have 2 fields:

  1. Violation Present? (Yes/No)
  2. Violation Details (Text)

The Violation Details field is set to be shown if and required if Violation Present = TRUE.
The user selects Violation Present = TRUE, then enters a value for the Violation Details.
If they then change their mind and set Violation Present = False, the Violation Details is immediately hidden. However, the value they entered into the Violation Details still gets saved with the record. How can I clear the value from the Violation Details when the user changes the other field from TRUE to FALSE or anytime the field gets hidden?

0 5 1,127
5 REPLIES 5

Iโ€™ve encountered the same problem a number of times. Unfortunately there does not seem to be an easy way to do this, but you do have a few options to get around it.

1.) Whatever fields access that value later, you can make their access also depend on the true/false value of the 1st column.
2.) Add a virtual column with expression IF(ISBLANK([violation present]) , [violation details] , โ€œno violationโ€), or some-such, and use that VC for any further fields.
3.) Change data workflow that will clear the value of column 2 if column 1 is set to false.
4.) Only a kind-of solution; set initial value of column 2 to โ€œโ€, and enable Reset on Edit.

@Eleshia_Robinson
Maybe I am missing the issue here, but canโ€™t you just change the ShowIf to be:
OR(
[Violation Present]= TRUE,
NOTISBLANK[Violation Details]
)

The issue is that I donโ€™t want any value saved in the Violation Details if the Violation Present field is set to False. I could use your suggestion to keep the field visible and ask the users to clear the VD field manually, or even force them to do that. Just trying to avoid manual processes for the user.

Steve
Platinum 4
Platinum 4

@Marc_Dillon covered all the bases in his reply. #3 seems the best to me. Note, though, it doesnโ€™t need to be a change workflow; it could also be a form-saved action.

I am facing the same problem! Is there any best solution yet?

Top Labels in this Space