UNDOCUMENTED FUNCTIONS

Hidden functions not listed in the Appian documentation.

WARNING: They are discouraged by Appian from being used. Note that using these functions in an interface will prevent you from editing the interface's SAIL code in Design Mode (it will cause an error as seen below).

try( [TRY CODE] , [CATCH CODE] )

The try() function can allow you to get some error handling within Appian, although it will not work to catch all error types.

Usage examples:

try(concat(), "Failed") will return "Failed".

try(concat("a", "b"), "Failed") will return "ab".

The try() function will not catch every type of expression error. For example:

try(asdf, "Failed") will fail and return a red (Appian) error:

fn!lastError()

You can query the error from try() using fn!lastError().

For example:

try(

concat(),

fn!lastError().details

)

Will return "Expression evaluation error at function 'concat' [line 4]: Too few parameters for function; expected at least 1 parameters, but found 0 parameters."

eval( [TEXT TO EVALUATE] )

Converts the text to SAIL code, then evaluates the code, similar to eval() in JavaScript.

Usage examples:

eval("1+1") will return 2.

eval("len(""asdf"")") will return 4.

You can also use it to call Constants or Expression Rules, such as, if you have a Constant with the value "Test", you can call it from eval():

eval( "cons!MY_CONSTANT" ) will return "Test"