Developer Documentation Library > UNICOM Intelligence Function Library > Categorical functions > DefinedFactors
 
DefinedFactors
Returns a set of factor numbers as defined on the categories in a variable.
Syntax
DefinedFactors(<value> [, <answers>])
Parameters
<value>
Type: Categorical
Categorical 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, or it can be an Elements list itself.
<answers>
Type: None
(Optional.) Variant value of type Categorical or Text, specifying a set of categories to look for. If omitted, all categories from the object are used.
If <answers> is of type Text, it is assumed to be a category expression and is resolved to a list of categories. If <answers> is of type Categorical and contains category names, they are converted to category numbers.
(return)
Type: Categorical
Set of factor numbers as defined in on the categories, matching the order of the categories in Answers.
Notes
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 function returns a factor of 0 for sublists and for categories with no factor defined. Factors can be long or double values.
To sort the returned values, use SortAsc or SortDesc.
See also
Categorical functions