Setting the Value of a Text Field
- Last UpdatedNov 14, 2022
- 1 minute read
A special SetValue() method allows you to set the value of a field programmatically, with full interactive checking applied:
.setValue( !value is ANY, !doCallback is BOOLEAN )
-
If the value's type fails to match the field type, a trappable error is raised.
-
If the types match, the value is validated and the VALIDATECALL is run, if there is one.
-
If the value is invalid then a trappable error is raised. If the field is shown then it is set 'in error', and the focus is returned to it so that you can edit the value.
-
If the value is valid then the method executes the field callback if !doCallback is true.