Function Alias form
|
|
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, use the Preview toolbar button () to review the presentation of the alias rule, and the Run toolbar button () 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 |
Input Parameters | |
Name |
Provide a name for each input parameter. |
Description |
Provide a meaningful short description for each parameter. |
Data Type |
Select the appropriate data type from the drop-down menu. |
Prompt 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 |
If the parameter has a default value, select it from the list of available properties. |
Optional? |
Check the checkbox for each optional parameter. |
Presentation | |
Return type |
Select the return type for this SQL expression from the drop-down menu. |
Category |
Optional. Select a category from the drop-down menu, or select the Edit button beside the menu to add a custom category. |
Template |
Enter the prompt text to display when the user edits this template in the SQL Function 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} Review an existing SQL function alias rule, or consult the list of available SQL function aliases, for examples. |
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 |
Optionally select an output format from the drop-down menu. |
Source |
Provide here the syntax that generates the SQL text for this function. You may use JSP tags such as <pega:choose > and<pega:when > to derive the correct text. |
Complete these fields to define a function that creates Java code. Choose a function.
Field |
Description |
Select a Function |
Click when defining a new function alias rule to find the Library, Name, and RuleSet through searches rather than selection. C-1931 On the pop-up window, select the return type of the function you want in the Filter by field. B-15888Enter a word or partial word in the Find box, then click Go repeatedly to review in sequence any functions that contain that word in the name. Click Open to review a function rule, and click Select to record your choice.
Choose a function that returns a Boolean, integer, or other primitive return type, or a string ( |
Function Reference |
Copy this information from the selected function rule. |
Name |
The name of the function (Rule-Utility-Function rule type) that this rule provides an alias for. Click() to review the function defined by the Name, RuleSet, and Library fields. |
Returns |
The return type of the function, from the function rule. |
Description |
The function description, from the function rule. |
Library |
The library containing the function. |
RuleSet |
The RuleSet to which the function belongs. |
This array contains a row for each function parameter, in the order they appear in the function signature. You cannot add or delete rows from this array. SR-3844 B-21151
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 |
Input Parameters |
|
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 text description for this parameter, as internal documentation of this function alias rule. |
Prompt Type |
Select to determine how the system prompts users to enter a value for this parameter within the template when this alias is selected:
|
(no label) |
Complete the prompts corresponding to the choice you made in the Prompt Type field:
|
Default |
Optional. Provide a literal constant default value for this parameter, or enter a property reference starting with a period. |
Field |
Description |
Presentation | |
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 convert the result to a different (compatible) type. See Data type conversions in expressions. |
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 |