Understanding Function Aliases in PEGA
Enigma Metaverse
Here, science meets art. And high tech goes far beyond computer code.
In the realm of Pega applications, functions play a critical role by executing specific tasks, taking in arguments, and returning results. However, there's another powerful tool at developers' disposal: function aliases. Function aliases are custom functions created by developers to meet their specific requirements and streamline their work. A notable difference between functions and function aliases is that while functions are executed on the Pega side, function aliases can also be executed on the database side.
Function aliases are a rule type of class Rule-Alias-Function and are found under the Technical Category in the Records explorer. Based on their usage, function aliases in Pega can be categorized into two types:
?
Function Alias for SQL Expression?
The function alias for SQL expression allows developers to write customized functions within the report definition to meet specific requirements when querying the database.
?
Configuration — Function Alias for SQL Expression
?
Input Parameters
When creating a function, it’s necessary to pass the required arguments. The input parameters section defines the list of arguments needed to build the SQL expression. The fields to be filled include:
?
Presentation?
领英推荐
The presentation section defines the design time and run-time configuration of the alias rule and includes:?
?
Source
The source section allows developers to write an SQL expression to build the core logic for the function alias.
?
Invoking Function Alias in Report Definition
Invoking a custom function alias in a report definition is straightforward:
By leveraging function aliases, developers can create tailored functions that enhance the flexibility and efficiency of their Pega applications. This powerful tool enables the handling of complex requirements directly within report definitions, streamlining the development process and improving overall functionality.
?
-Team Enigma Metaverse