The
setvaluesets function allows you to dynamically change the value sets associated with multiple items. Unlike the
setvalueset function, which only operates on one item, the
setvaluesets function traverses every item in the primary dictionary and searches each item's value sets to see if they have a name that contains the text found in the string expression
value_sets_search_query. If the text is found, the first value set with the name containing the expression is the value set used for the item. Otherwise the currently used value set is maintained.
Before multiple language dictionary labels were added in CSPro 6.2, this function was useful for changing the language of value sets in a multi-language application.
The function returns the number of items whose value sets were changed.