Functions and Syntax in Pega

This Post is about the functions in pega and how to use them.
Everytime I need to use Pega function which I have rarely used , I try to find, how to pass the parameters from references and try the same , this post is going to help me to check all the syntax of frequently used functions in single page.

I have written separate post on , why we need to use Pega built in functions

Click the button to copy the syntax now

Date time Functions are added.Click here

Pagelist Functions are added.Click here

Function Generate ID
Syntax
Notes C- is an example of Prefix, this can be replaced with prefix of required.
@pzGenerateUniqueID(tools, "C-")
Function Get DSSValue in pega
Syntax
Notes For example: @getDataSystemSetting(ApplyJobs,NotificationExpiry)
Function To Log Message
Syntax
Notes Logs the message for specified level in pega logs.
[d- debug],[i-info],[f-infoforced],[w-warning],[e-error]
For example : @Default.pxLogMessage("Hello Testing",'f')
Function Delete all instance of Data Page
Syntax
Notes Deletes all instances of Datapage
For example: @(Pega-RULES:DeclarePages).pzDeleteAllInstancesOfDeclarativePage(tools,D_City)
Function To Run Decision Table
Syntax
Notes To run the decision table
For example: @(Pega-RULES:DecisionTable).ObtainValue(tools,Primary,SelectApplication)
Function To convert to Json
Syntax
Notes To convert the property from Page to Json format
For example: @pxConvertPageToString(tools,RequestPage,"json")
Function To convert JSON to Page format
Syntax
Notes To convert the response json into response page property
For example: @pxConvertStringToPage(tools,ResponsePage,Param.ResponseJSON,"json")
Function To Use Regular Expressions to remove HTML Tags
Syntax
Notes To remove the HTML tags formed by the rich text editor
For example: @String.pxReplaceAllViaRegex(.Description,"<(.|\n)*?>","")
/ You can look into the Formatter.pxFormatCommon function java code to see the usage of pzUnescapeHTMLSpecialChars function


Please comment , if you need any function to be included here

Post a Comment