Function rules in offline mode
You use function rules in online-only applications to define Java methods that run
when a function rule is processed. When you develop an application that users can access with
an offline-enabled mobile app, the mobile app uses JavaScript-based equivalents of Java-based
utility function rules, provided that such equivalents exist. Offline-enabled mobile apps support a specific set of JavaScript functions that are
equivalent to predefined Java utility functions.Supported JavaScript functions in offline mode
Library name JavaScript text file rule Supported functions DateTime
pzpega_functions_DateTimeLibrary CompareDates
CompareDates__String_String_boolean
isDateInThePast
pxDateTimeisPastOrFuture
isWithinDaysOfNow
compareDatesByDays
currentDateTime
getCurrentDateStamp
getCurrentTimeOfDayOnlyStamp
getCurrentTimeOfDayStamp
getCurrentTimeStamp
millisecond__BigDecimal
minute
minute__BigDecimal
month
month__BigDecimal
dateValue
day
day__BigDecimal
FormatElapsedTime
FormatElapsedTimeFromProperty
date
dateStringToBigDecimal
dateTimeToBigDecimal
DateTimeDifference
DateTimeDuration
pxIsDefaultDateTime__BigDecimal
second
second__BigDecimal
year
weekday
TimeDifference
parseDateString
addCalendar
addToDate
CompareDateTimeStamp
CurrentDateTime
GetDate
getTimeStampAsDateStamp
hour
hour__BigDecimal
Default
pzpega_functions_DefaultLibrary isInThePast
ExpressionEvaluators
pzpega_functions_ExpressionEvaluatorsLibrary compareTwoDateTimes
compareTwoNumbers
compareTwoStrings
compareTwoValues
CompareToBoolean
sum
abs
sqr
round
evaluateWhen
Math
pzpega_functions_MathLibrary greaterThan
greaterThanEqualTo
lessThanEqualTo
lessThan
BoundInteger
Sqrt
Exp
Log
Square
equals
notEqual
divide
divideWithScale
_divideWithScale
Sort
pzpega_functions_SortLibrary nullCheck
classicComparsion
compareStrings
defaultCompareStrings
defaultCompareDates
defaultCompareDecimals
defaultCompareNumbers
defaultCompareTimes
defaultCompareBooleans
isNumeric
compareWorkIDs
String
pzpega_functions_StringLibrary notEqualsIgnoreCase
equalsIgnoreCase
contains
equals
startsWith
endsWith
replaceAll
stripCharsOffEnd
stripNonAlphabeticChars
substring
substring__String_int
escapeWithMap
escapeAsHTML
escapeForXSL
indexOf
inString
trim
TrimNumber
truncateLongText
whatComesAfterFirst
whatComesAfterLast
whatComesBeforeFirst
whatComesBeforeLast
isAlphaNumeric
isDouble
isInteger
isLiteral
length
notEquals
toLowerCase
toUpperCase
toDecimal
_removeThousandSeparator
toDate
_getDateWithoutTime
toDateTime
_roundNumber
pxIsInGRSFormat__String
pxReplaceAllViaRegex
pzFullfillTab
pzGetFirstCharacterFromEachWord__String_boolean
pzSplit
Utilities
pzpega_functions_UtilitiesLibrary IsInPageList
LengthOfPageList
Previous topic Adding validate rules to the allow list for offline use Next topic Data transforms in offline mode