The
getvaluelabel function returns the value label associated with the current value of
item_name. The label is determined in the following order, with the first valid label returned:
- The label for the value in the item's current value set.
- The label for the value in the item's primary value set.
- The value itself, formatted for displaying.
The function returns a value similar to calling:
The function returns a string containing the label.
PROC GRADE_ATTENDING
if GRADE_ATTENDING > 3 and AGE < 15 then
errmsg("Someone aged under 15 cannot attend %s.", getvaluelabel(GRADE_ATTENDING));
reenter;
endif;
// using the "%l" message formatter, the above error message can also written as:
errmsg("Someone aged under 15 cannot attend %l.", GRADE_ATTENDING);