Defining a basic scalar function
- Last Updated: May 12, 2026
- 1 minute read
- OpenAccess SDK
- Version 8.1
- Documentation
Use this method to define a scalar function with default values for precision, scale, and length for the result of the scalar function.
scalar_function (
String sName,
int iConstantFunc,
String pfScalarFunc,
int iResXoType,
int iNumInputParams)
If you want to define a scalar function that has a qualifier, use the following syntax:
scalar_function (
String sQualifierName
String sName,
int iConstantFunc,
String pfScalarFunc,
int iResXoType,
int iNumInputParams)
Parameters for basic scalar function
| Parameter | Type | Description |
| IN | ||
| sQualifierName | String | The name of the function qualifier |
| sName | String | The name of the scalar function |
| iConstantFunc | int | Indicates whether the function has constant output. 1 – indicates that the function is a constant scalar function and is evaluated only once per query if all its arguments are literal values. 0 – indicates that the function is a variable scalar function and therefore should be evaluated once per record during the dam_isTargetRow call, regardless of the input. |
| pfScalarFunc | String | The method in the IP that is to be called to execute this scalar function. |
| iResXoType | int | The data type of the result value of the scalar function. |
| iNumInputParams | int | The number of arguments expected by the function >=0 to allow fixed argument list < 0 to allow variable argument list with a maximum of |args| |
| RETURN | ||
| NONE |