Write, Bureaucrats, Administrators
4,332
edits
mNo edit summary |
mNo edit summary |
||
Line 162: | Line 162: | ||
=== Examples === | === Examples === | ||
==== | ==== Data Validation ==== | ||
Using scripts, you can check the correctness of input data. For example, for a field integer values are allowed only from 0 to 200. | |||
<source lang="javascript" line> | <source lang="javascript" line> | ||
var num = entry().field("Number") | var num = entry().field("Number") | ||
Line 171: | Line 172: | ||
} | } | ||
</source> | </source> | ||
# | |||
# | # We get the value of the field Number | ||
# | # Tests for values matching the allowable range | ||
# | # If the value is out of range then display a message Wrong range | ||
# Cancels the operation | |||
This script should be used for the action Create recording or change the recording and phase before saving . | |||
====Установка значений по умолчанию==== | ====Установка значений по умолчанию==== |