You are here: Reference > Rule types > Function Aliases > Function Alias form - Completing the Reference tab

Function Alias form
Completing the Reference tab

  1. About 
  2. New 
  3. Reference 
  4. Generated Output 
  5. History 
  6. More... 

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.

SQL Function Alias Reference fields

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:

  • Autocomplete — As the user starts to type an entry, the application provides available options that match the text entered.
  • SmartPrompt — To present properties through a SmartPrompt list, starting at the Applies To class of this alias rule.
  • Drop-down Menu — To require selection from a fixed list of constants (recorded on this form) or defined through the Table Type fields on the General tab of a property.
  • Property aliases — To allow users to select a property based on Rule-Obj-Property-Alias rules that belong to a specific category (and match the RuleSets and Applies To class of the user context)
  • Textbox — To allow users to enter unedited text.
  • No Prompt — Users are not prompted for a value. The value is a constant or is provided by a clipboard property reference and appears in read-only format at runtime.
  • No Prompt (Hide) — The user is not prompted for a value. The value is a constant or is provided by a clipboard property reference and is not shown at runtime.
  • HTML Property — The input field presentation is a control rule associated with a designated property. This may be a check box, radio buttons, a selection list, or other familiar input field format.
Default

If the parameter has a default value, select it from the list of available properties.

Optional?

Check the check box 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 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, or consult the list of available SQL function aliases.

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.

Java Function Alias Reference fields

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.

On the pop-up window, select the return type of the function you want in the Filter by field. Enter 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 (java.lang.String) value. You can't define a function alias rule for a function that returns a complex Java type.

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 Open icon 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.

Input Parameters

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.

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

add row

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:

  • SmartPrompt — To present properties through a SmartPrompt list, starting at the Applies To class of this alias rule.
  • Drop-down Menu — To require selection from a fixed list of constants (recorded on this form) or defined through the Table Type fields on the General tab of a property.
  • Property aliases — To allow users to select a property based on Rule-Obj-Property-Alias rules that belong to a specific category (and match the RuleSets and Applies To class of the user context)
  • Textbox — To allow users to enter unedited text.
  • No Prompt — Users are not prompted for a value. The value is a constant or is provided by a clipboard property reference and appears in read-only format at runtime.
  • No Prompt (Hide) — The user is not prompted for a value. The value is a constant or is provided by a clipboard property reference and is not shown at runtime.
  • Control rule — The input field presentation is controlled by a control rule (formerly HTML Property rule) associated with a designated property. This may be a check box, radio buttons, a selection list, or other familiar input field format.
(no label)

Complete the prompts corresponding to the choice you made in the Prompt Type field:

  • SmartPrompt size — If you selected SmartPrompt, enter a nominal character width for the input field. The default is 20 characters.
  • Options From — If you selected Drop-Down Menu, choose Option List to enter a list of literal constants separated by commas, or Property to enter a property that is the source of table values to be presented.
  • Text box size — If you selected Textbox, identify a nominal width of the text box in characters. The default is 20 characters.
  • Property Alias Category — If you selected Property Alias, Select a category to act as a filter for property aliases. The selection list shows only those that match the category value.
  • Parameter Value — If you choose No Prompt or No Prompt (Hide), enter a literal constant or a property reference starting with a period.
  • Use — If you selected Control rule, choose Input Parameter for the Use field if another row of this Input Parameters array identifies a property, and you want the control rule for that property to govern the presentation of the prompt. Choose Property for the Use field, and select any property (in the Applies To class or a higher class) if you want the control rule for that property to govern the presentation of the prompt. In the latter case, you can choose any property with a desired control rule; it need not be present on the clipboard or otherwise involved in the function.
Default

Optional. Provide a literal constant default value for this parameter, or enter a property reference starting with a period.

Presentation

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 No Prompt (Hide).

About Function Alias rules