I have a field in a form that controls the display of two other fields. In this case, the field is for alternate locations. If it is yes, a City and State field appear. If it is null, or no, the City and State fields do not appear.
But what if you select "Yes" for the other location field, enter data into the City and State fields, and then change the other location field back to no? Well, having set the field property to refresh fields on keyword change, the City and State fields become hidden, but the data remains stored. If those hidden fields controlled the display of other fields, or some back-end workflow, this would be a big problem. By plugging an appropriate input translation formula into the two ensuing fields, they are cleared each time the other location field is changed from "yes" to "no."
In the City field input translation formula, for example, check the otherLocations field for data. If it is does not evaluate to "yes," clear the City field. If otherLocations evaluates to yes, leave it alone. The refresh is handled by the property setting of the other locations field.
@If(otherLocations = "No" | otherLocations = "";"";City)
Do you have comments on this tip? Let us know.
This tip was submitted to the SearchDomino.com tip exchange by member Andrew Young. Please let others know how useful it is via the rating scale below. Do you have a useful Notes/Domino tip or code to share? Submit it to our monthly tip contest and you could win a prize and a spot in our Hall of Fame.