function allows you to dynamically change an item's current value set. An item's current value set is used to determine whether or not entered values are out of range. The current value set is also used to provide the value choices displayed in extended controls
. The changing of a value set is not permanent; it remains in effect only during the processing of the current case or until the next call to setvalueset
The item_name is the name of the item in the data dictionary whose value set is to be changed. The argument is usually an item name but, preceded by the @ symbol, it can also be a string expression that evaluates to the name of an item; for example:
The argument value_set_name
is the name of an existing value set in the dictionary for the specified item. The function will replace the values of the current value set for the item with the values from the value set specified by value_set_name
, which is either the name of a value set or a string expression that evaluates to a value set name. The value_set_name
can also be the name of a dynamic value set
When using a value set specified in the dictionary, the function returns a logical value of 1 (true) if the value set was changed successfully and 0 (false) otherwise (for example, if the value set name is invalid). With dynamic value sets, the function returns the number of codes in the newly created value set.