Developer Documentation Library > UNICOM Intelligence Function Library > Categorical functions > DefinedListElements
 
DefinedListElements
Returns a set of elements of a categorical variable.
Syntax
DefinedListElements(<value>, <answers> [, <types>])
Parameters
<value>
Type: None
Variant value, used only to specify which MDM object to use.
<value> can refer to any type of MDM object that has elements, for example, Field, Array, Grid or VariableInstance.
<answers>
Type: None
Text or Categorical value specifying element lists in <value>.
<types>
Type: Long
(Optional.) Flags specifying which types of Element objects to include. The default value is (Category + Base).
Value
Description
1
Category elements
2
Base elements
4
Subtotal elements
8
Summary data elements
16
Derived elements
32
Subheading elements
These values can be used in any combination, to select elements of more than one type. For example, to select all Category and Base elements, use 1 + 2 = 3.
(return)
Type: Categorical
Element numbers from the specified lists.
Notes
If <answers> is of type Text, it is assumed to be a category expression, except that it only applies to category lists (Elements objects in MDM), and is resolved to a list of lists. It can contain both names of Elements objects and their numeric values. If <answers> is of type Categorical, only lists with the same value as the categories in <answers> are used. If <answers> is NULL, all lists in <value> are used. If <answers> is of any other type, an error occurs.
This function requires the case data to be opened with an MDM document or for a script to have an open MDM document available to it. Otherwise, an error will occur. For more information about opening a MDM document in a script, see Value resolution.
The return value is the union of the elements from the selected lists, including elements from any sublists they contain. Any list name or value that is not found among <value>'s elements is silently ignored, with no error reported.
See also
Categorical functions