Complete these fields to define how the function alias appears and which function rule it executes. The appearance of this tab depends on the Applies To class of the rule; for the Embed-UserFunction class, complete the SQL fields.
After you save the rule form, click Actions > Preview to review the presentation of the alias rule. Click Actions > Run to test the function alias rule in conjunction with the function rule.
Complete these fields to define an SQL function for use in report definitions
Field |
Description |
Name |
Provide a name for each input parameter. |
Description |
Provide a short meaningful description for each parameter. |
Data type |
Select the appropriate data type from the drop-down menu. |
Type |
Select an option for how the system prompts users to enter a value for this parameter within the template when this alias is selected:
|
Default value |
If the parameter has a default value, select it from the list of available properties. |
Optional |
Check the box if the parameter is optional. |
Field |
Description |
Return type |
Select the return type for this SQL expression from the drop-down menu. |
Category |
Select a category from the drop-down menu, or select the Edit button beside the menu to add a custom category. |
Pattern template |
Enter the prompt text to display when the user edits this template in the Calculation Builder. Reference the input parameters by their row number in the Input Parameters table, surrounded by curly brackets, such as: {3} characters from {1}, starting at position {2} To see examples, review an existing SQL function alias rule. |
Echo template |
Enter the text to display in a Report Definition rule using this SQL function alias in one of the columns of its report. |
Output format |
Select an output format from the drop-down menu, or select the Edit button beside the menu to add a custom format. |
Source |
Provide the syntax that generates the SQL text for this function here. You may use JSP tags such as <pega:choose > and <pega:when > to derive the correct text. |
Complete these fields to define a function alias that references a Java function.
Field |
Description |
Function Name |
Select a function name from the drop-down menu when creating the function alias. This populates fields in the Function reference section. |
Function reference |
Information about the function that is populated after choosing a function name. |
Name |
The name of the function (Rule-Utility-Function rule type) that this rule provides an alias for. Click the Edit icon to review the function defined by the Name, Description, RuleSet, and Library fields. |
Description |
The function description, from the function rule. |
Library |
The library containing the function. |
Ruleset |
The ruleset to which the function belongs. |
This section contains a row for each function parameter in the order they appear in the function signature. You cannot add or delete rows from this section. Complete each row to determine whether and how users enter a value for the parameter. Every parameter must be accounted for, even if the corresponding parameter number does not appear in the Template field.
Field |
Description |
1., 2., 3. |
Note the sequential number of each parameter, as this identifies the parameter in the Template text. |
Name |
Name of the parameter, from the function rule. |
Description |
Enter a short text description for this parameter as internal documentation of this function alias rule. |
Type |
Select to determine how the system prompts users to enter a value for this parameter within the template when this alias is selected:
|
Default value |
Provide a literal constant default value for this parameter, or enter a property reference starting with a period. |
Textbox size |
Enter the maximum length in characters that the text box should accommodate. |
Field |
Description |
Return type |
Select the type of the function return when this alias function rule is used. Ordinarily, this is the same as the type of the function, but you can choose another type if desired to cause the system to convert the result to a different (compatible) type. See Data type conversions in expressions. |
Pattern template |
Enter a text description of this function suitable for display in decision rules. Surround references to parameters in this text by curly brackets. Identify each parameter by number, as: Integer remainder of {1} divided by {2} The system uses the Short Description of the function as the default text in this field, followed by all parameters in curly brackets. You can edit it as desired. Make sure all the parameters are identified, except for those you marked |