Developer Documentation Library > UNICOM Intelligence Function Library > Miscellaneous functions > SampleCategorize
 
SampleCategorize
A simple version of the Categorize function that is used with the Sample Reporting MDSC (Phone Reports).
Syntax
SampleCategorize(<value>, <variable>)
Parameters
<value>
Type: None
Variant value of type Long, Double, Text, or Date
<variable>
Type: Text
The name of the categorical variable, which will be used to ensure the generated category name exists.
(return)
Type: None
If the generated category name exists in the metadata, the category is returned, otherwise NULL is returned.
Notes
Similar to Categorize, the conversion process starts by generating an MDM name from the value Val. The MDMName function is used for this process. If the generated category name exists in the metadata, the category is returned, otherwise NULL is returned.
Unlike Categorize, SampleCategorize does not return NA or Other based on a variable definition.
Example
_Queue "Sampe queue"
categorical [1..1]
{
FRESH "Fresh",
ACTIVE "Active",
TIMEDOUT "Timed Out",
NA "No Answer" na,
other "Other" other
};
The following result is returned:
Result = SampleCategorize(Val, "_Queue")
Val
Result
"Active"
{ACTIVE}
" "
NULL
"NoAnswer"
NULL
See also
CreateObject
Miscellaneous functions