Commonly Used OOTB Functions
Commonly Used OOTB Functions
AddCalender() : useful to add the given years, months, weeks, days, hours, minutes,
and seconds to the DateTime passed in (or the current DateTime if no DateTime is
passed) and returns the resulting DateTime as a String.
AddToDate() : Adds the given days, hours, minutes, and seconds to the DateTime
passed in (or the current DateTime if no DateTime is passed) and returns the resulting
DateTime as a String.
contains() - Useful to compare two srings. returns true if str1 contains str2. returns false
if either string is null
@contains("PRPC 7.2" ,"7.2") = true
startsWith - Useful to compare two srings. returns true if str1 starts with str2.
endsWith - Useful to compare two srings. returns true if str1 ends with str2.
equals - Useful to compare two srings. returns true if str1 equals to str2
pxContainsViaRegex() : Checks that the input "contains" the regular expression via
either the find() or matches() method.
find() = Attempts to match any PART of the input sequence against the pattern
matches() = Attempts to match the ENTIRE input sequence against the pattern
pxContainsViaRegex("lskdlskdld87",[a-zA-Z0-9])
pxContainsViaRegex("lskdlskdld87",[(0-2)a-zA-Z0-9])
whatComesBeforeLast
whatComesAfterLast
WhatComesBeforeFirst
whatComesAfterFirst
Param.A = C-20220520-293293
Param B = @whatComesBeforeLast(Param.A,’-‘) C-20220520
BC-92392392-92392932
Str1 = whatcomesBeforeLast("C-9898-293293",'-')
Advanced Functions :
propertyHasValue(.Age) .Age==””
propertyExists(.Age)
PropertyHasErrors
CallActivity("StepPage","MyActivity")
pxExecuteAnActivity(“Primary”, “StepPage”,”ActivityName”)
lengthOfPageList(StateList.pxResults)
isInPageList(Param.StateToSearch,"StateName",StateList.pxResults)
Param.SearchTo="StateName"
isInPageList("Tamilnadu", Param.SearchTo, StateList.pxResults)
CountryList.pxResults
For a page, which as “CountryCode” as “IND”
Param.SearchProperty = “CountryCode”
IsInPageList(“IND”,Param.SearchProperty, CountryList.pxResults) == true/false
CountryCode = IND
CityCode = HYD
isInPageListWhen(WhenRule, StateList.pxResults)
Param.Index = @IndexInPageList(“Telangana”,”StateName”,StateList.pxResults)
Capital = StateList.pxResults(Param.Index).Capital
IndexInPageList(“KR”,”StateCode”,StateList.pxResults) Param.Index
If Param.Index!=-1
Param.Capital = StateList.pxResults(Param.Index).Capital
indexInPageList(Param.StateToSearch,"StateName",StateList.pxResults)
-1 returned if string not found in the list
indexInPageListWhen
countInPageList("IND","CountryCode",StateList.pxResults)
countInPageListWhen