DtvLong dal_cch_chk_rng (par)

Checks whether the current field content is within the range of values passed.

Input Parameters Significance
char *par range of values:
threshold value 1
threshold value 2

Output Parameters Significance
none -

Return Code Significance
0 field content correct
1 field content too small
2 field content too big

Can be invoked as post_field-userexit at any field of a mask.

Threshold value 1 is the lower, threshold value 2 the upper limit. The values must be separated by spaces and have to be identical to the data type of the field to be checked. You can specify threshold values for all field data types supported by DataView.

If you pass = > * < as threshold value 1, the userexit will check whether the field content is smaller or equal than threshold value 2.

If you pass = > * < as threshold value 2, the userexit will check whether the field content is greater or equal than threshold value 1.

If a current field content is not within the specified range of values, Dataview will output a message. The user will not be allowed to leave field before entering a correct value. Empty fields are not checked.

Sample input for different field data types:

Note! The function dal_cch_chk_rng only validates fields that are "dirty". If the field has left without any changes made, the function will return nothing, even if its content is illegal.