Survey Tabulation > Advanced expressions > UNICOM Intelligence function library
 
UNICOM Intelligence function library
The UNICOM Intelligence Function Library (mrFuncLib.dll) supplements the basic expression evaluation with some more advanced operations. The functions can be divided into the following groups:
Categorical functions: Functions that operate on categorical data only.
Text, categorical, or array functions: Functions that operate on text or categorical data, or arrays.
Text functions: Functions that operate on text data only.
Date and time functions: Functions that operate on date and time data only.
Conversion functions: Functions that convert data from one data type to another.
Random number functions: Functions for generating random numbers.
List functions: Functions for ordering, and retrieving items from, category lists, arrays, and collections of objects.
Mathematical functions: A number of mathematical functions.
Miscellaneous functions: Functions that do not fall into any of the other groups.
If an MDM Document is specified when the connection is made to the Data Model, the MDM Document is passed to relevant functions automatically. The variable ID of the current variable instance in the MDM document is also passed to relevant functions.
If you open the case data without specifying an MDM Document or an MDSC, you can use all of the functions except the DefinedCategories and DefinedElements functions. However, when you connect without specifying an MDM Document or an MDSC, you must always specify categories using their numeric category values and not using their names or a category expression to define one or more ranges of categories. Similarly, in mrScriptBasic you can specify categories using their names or category expressions only when an MDM Document is available to the mrScript Engine. When an MDM Document is not available to the mrScript Engine, you must specify categories using their numeric category values. For further details, see Value resolution.
Dates and times and numeric data that contains decimal symbols and thousands separators are presented differently in different international locations (called locales). (You typically specify the locale on your PC using Regional Options in the Windows Control Panel.) The Case UNICOM Intelligence Data Model uses two different locale settings (called the input locale and the output locale) in order to handle situations where, for example, a questionnaire is presented in one language and answered in another. These settings can be defined as connection properties when you connect to the UNICOM Intelligence Data Model. See Locale handling in the UNICOM Intelligence Data Model for more information. The input locale and output locale are automatically passed to the functions and are used when necessary for interpreting input data and formatting output data and error messages.
This section includes some examples of using the functions in SQL queries and mrScriptBasic. How you specify a text string as an argument to any of the functions depends on whether you are using the function in an SQL query or in mrScriptBasic or mrScriptMetadata. In an SQL query, enclose text strings in single quotation marks ' '. In mrScriptBasic or mrScriptMetadata, enclose text strings in double quotation marks " ".
For an introduction to using the functions in SQL queries, see I want to use the Data Model to access data, but I am used to SPSS-style data. Can you give me an overview?.
For information about adding function libraries, see Adding function libraries.
Additional data management functions (DataManagementFuncLib.dll) are also available: see Data Management functions.
See
Calling syntax
Value resolution
Categorical values
Opening an MDM document in a script
Category expressions
Categorical functions
Text, categorical, or array functions
Text functions
Date and time functions
Conversion functions
Random number functions
List functions
Mathematical functions
Miscellaneous functions
See also
Advanced expressions