Abbreviate

Extension: Functions

Returns the abbreviation of the given text.

Name Type Description Optional
Return Value String Returns the abbreviation of the given text. No
Parameter 1 text String The text to be abbreviated No
Parameter 2 length Integer The length of the abbreviated text No

Example:

Abbreviate('hello world',5)


ABS

Calculate the absolute value of the given argument.

Name Type Description Optional
Return Value Number the absolute value of the given paramter No
Parameter 1 number Number the number whose absolute value must be calculated No

Examples:

ABS(-12.4)=12.4
ABS(5)=5


ABSOLUTEPATH

Build the absolute path to a file in the Data Home folder.

Name Type Description Optional
Return Value String absolute path to a file in the Data Home folder No
Parameter 1 path String relative path to a file in the Data Home folder No

Example:

ABSOLUTEPATH('conf/content.properties') ='C:/.../conf/content.properties'


AccessPolicyCheck

Check whether there is an Access Policy for the given Business Object and return the Policy decision. If there is no such Access Policy, the default decision is returned. If there is no default decision, null is returned.

Name Type Description Optional
Return Value Boolean Access Policy Check result No
Parameter 1 userId String User Id or null for anonymous user No
Parameter 2 type String Business Object Type No
Parameter 3 id String Business Object Id No
Parameter 4 default Boolean Default Decision Yes

Examples:

AccessPolicyCheck(USERID(),'Workflow','AOP',false)
AccessPolicyCheck($creator,'Workflow','Credits',USERINROLE('User'))


ACOS

Extension: Functions

Arccosine

Name Type Description Optional
Return Value Double Arccosine No
Parameter 1 value Double Value No

Example:

ACOS(0.5)


ADD

Calculate the sum of all arguments.

Name Type Description Optional
Return Value Number return the sum of all arguments No
Parameter 1 value Number the value that must be summed up No
Parameter 2 value2 Number the other value that must be summed up Yes
Aliases "+"

Example:

ADD(1,2)=3


AddClientKeyAlias

[no description]

Name Type Description Optional
Return Value Nothing No
Parameter 1 hostname String The hostname for the hostname<->alias mapping to be added No
Parameter 2 alias String The alias for the hostname<->alias mapping to be added No

Example:

AddClientKeyAlias('localhost','crm_service')


AddPrivateKey

success of failure

Name Type Description Optional
Return Value Boolean success of failure No
Parameter 1 alias String The alias the key should be saved under in the keystore. No
Parameter 2 keyfilepath String The path to the file containing the key you want to import No
Parameter 3 password String The password the key was stored with when created. No

Example:

AddPrivateKeyFunction('alias','/data/keys/key.pfx','password')


ADDTOTESTDATA

Add the given variable to the given test data

Name Type Description Optional
Return Value Nothing add the given variables to the given test data No
Parameter 1 testDataId String the id of the Test Data No
Parameter 2 variableName String the name of the variable No
Parameter 3 expression Any The the value of the variable No

Example:

ADDTOTESTDATA($testDataId, $variableName,$variableValue)


AddTrustedCertificate

success of failure

Name Type Description Optional
Return Value Boolean success of failure No
Parameter 1 alias String The alias the key should be saved under in the keystore. No
Parameter 2 certificatefilepath String The path to the certificate you want to import No

Example:

AddTrustedCertificateFunction('alias', '/data/certs/cert.cer')


AddUser

Extension: Functions

Nothing.

Name Type Description Optional
Return Value Nothing No
Parameter 1 user User The user to be added. No

Example:




AND

Calculate the booolean AND function. Returns true only if all arguments are true.

Name Type Description Optional
Return Value Boolean true if all arguments evaluate to true, false otherwise No
Parameter 1 booleanValue Boolean a boolean value No
Parameter 2 booleanValue Boolean a boolean value Yes
Aliases "&&", "and"

Examples:

AND(true,false)=false
AND(true,true)=true


APPENDLINE

Append the given strings to the given StringBuffer. Only use this function in ReportGeneratro scripts for CSV reports.

Name Type Description Optional
Return Value java.lang.StringBuffer Append the given strings to the given StringBuffer. Only use this function in ReportGeneratro scripts for CSV reports. No
Parameter 1 buffer com.nm.sdk.data.expeval.nodes.VariableNode the buffer where we want to append the messages. A variable of type Any containing a StringBuffer No
Parameter 2 separator String the message separation symbol No
Parameter 3 message String the message to be appended Yes

Example:

APPENDLINE('buffer',';','column1 text','column2 text','column3 text')


APPENDTOTEXTFILE

Append the given data to the given file. Relative paths are interpreted relative to the Data Home, use '{DATA_HOME}' to refere to the nm data home location.

Name Type Description Optional
Return Value Nothing Append the given data to the given file. No
Parameter 1 filepath String The path to the file. No
Parameter 2 data String The data to be added to the file. No
Parameter 3 encoding String The encoding of the file, default is 'UTF-8'. Yes

Example:

APPENDTOTEXTFILE('{DATA_HOME}/work/tmp/thefile.txt','some text')


ASIN

Extension: Functions

Arcsine

Name Type Description Optional
Return Value Double Arcsine No
Parameter 1 value Double Value No

Example:

ASIN(0.5)


ASSERT

Throws an AssertionException if condition isn't true

Name Type Description Optional
Return Value Nothing No
Parameter 1 condition Boolean condition to assert No
Parameter 2 message String error message if assertion fails Yes

Examples:

FAIL()
ASSERT($balance >= 0, 'negative balance')


ASSIGN

Assign a value to a variable.

Name Type Description Optional
Return Value Any the new value of the variable No
Parameter 1 var com.nm.sdk.data.expeval.nodes.ExecutionNode the variable No
Parameter 2 value com.nm.sdk.data.expeval.Pointer the new value of the variable or entity No
Aliases ":="

Example:

ASSIGN($entity,12.4) = $entity now contains the value 12.4


AssignWorkitemToUser

Assign a workitem to a user.

Name Type Description Optional
Return Value String Assign a workitem to a user. No
Parameter 1 workItemId String the id of the workItem that must be assigned to the given user. No
Parameter 2 userId String the id of the user whome the workitem must be assigned. No
Parameter 3 variableAssignments Named Any Variable Assignments for the valuestore of the workflowinstance being forwarded. Yes
Parameter 4 ignoreAssignmentErrors Boolean Ignores variable assignment errors if set to true (default: false). Yes
Parameter 5 forceCurrentProcessToken Boolean assigns to the current Workitem instead to a parent one lying inside a swimlane (default: false). Yes

Example:

AssignWorkitemToUser($itemId,$userId)


ATAN

Extension: Functions

Arctangent

Name Type Description Optional
Return Value Double Arctangent No
Parameter 1 value Double Value No

Example:

ATAN(0.5)


BBCode

Extension: Functions

Render BBCode-Formatted Text into HTML.

Name Type Description Optional
Return Value String HTML-formatted Text No
Parameter 1 string String BBCode-formatted Text No

Example:

BBCode($string)


BuildDataClassScript

Extension: Functions

Build the script that defines the given dataclass.

Name Type Description Optional
Return Value String Build the script that defines the given dataclass. No
Parameter 1 id String the id of the dataclass No
Parameter 2 versionFilter com.nm.sdk.data.businessobjects.versioning.VersionFilter the version filter used for retrieving the class, null selects the 'current' version No

Example:

BuildDataClassScript($id, $versionFilter)


CacheClear

Remove all objects from the application cache.

Name Type Description Optional
Return Value Nothing No

Example:

CacheClear();


CacheLookup

Return the object with the given name in the application cache.

Name Type Description Optional
Return Value Any Return the object with the given name in the application cache. No
Parameter 1 name String the name of the cached object. No

Example:

$cachedObject:=CacheLookup('myobject');


CacheNames

Returns an indexed collection of all object names in the application cache. This function does not check if the cache entries have expired.

Name Type Description Optional
Return Value Indexed String Returns an indexed collection of all object names in the application cache. This function does not check if the cache entries have expired. No
Parameter 1 pattern String Optional regex pattern to match names against. Yes

Example:

$names := CacheNames('user.*')


CacheRemove

Remove the object with the given name from the application cache.

Name Type Description Optional
Return Value Nothing No
Parameter 1 name String the name of the cached object. No

Example:

CacheRemove('myobject');


CacheStore

Store the given object with the given name in the application cache.

Name Type Description Optional
Return Value Any Store the given object with the given name in the application cache. No
Parameter 1 name String the name of the object to cache. No
Parameter 2 object Any the object to be stored in the application cache. No
Parameter 3 retentionExpression Any an expression that returns true as long as the object is valid. The expression may use the implicit variables $insertTimestamp (Long, the time when the object was stored in the application cache) and $accessTimestamp (Long, the time when the object was last accessed) to make the decision. Yes

Example:

CacheStore('myobject',$cachedObject);


CallIntegrationLink

Send a message through the message routing system.

Name Type Description Optional
Return Value Any Send a message through the message routing system. No
Parameter 1 integrationLinkId String The id of the integration link the message must be sent to No
Parameter 2 params Named Any The parameter assignments for the integration link No
Parameter 3 versionFilter String The version filter used for processing the exchange, null for inheriting the version filter. No
Parameter 4 waitForReply Boolean Wait for a reply. true: do wait, false: do not wait (default) No
Parameter 5 initialMessage Any the initial message sent to the integration link instance Yes

Example:

CallIntegrationLink($linkId,$params,$versionFilter, $waitForReply)


CallOracleProcedure

Extension: Functions

Return the result of the given SQL call to an Oracle Procedure

Name Type Description Optional
Return Value Indexed Any Return the result of the given SQL call to an Oracle Procedure No
Parameter 1 datasource String the name of the datasource No
Parameter 2 query String the SQL query No
Parameter 3 attributes Indexed Any the attributes of the query for a callablestatement Yes
Parameter 4 limit java.lang.Integer limit the number of results (default 0, no limit) Yes

Example:

CallOracleProcedure('xe', 'Begin TESTS.CURSOR_TEST (?, ?); End;', [{'type'='in', 'value'='2'}:Any, {'type'='out/cursor'}:Any]:Any);


CancelProcessInstance

Cancel a Process Instance

Name Type Description Optional
Return Value Nothing No
Parameter 1 processInstanceId String Process Instance Id No

Example:

CancelProcessInstance('129409273901')


CapitalizeTitle

Capitalize titles properly according to US rules. To change the list of words which should not be capitalized, edit configuration property nm.titlecapitalization.smallwords

Name Type Description Optional
Return Value String Properly capitalized title No
Parameter 1 string String A title with random capitalization No

Example:

CapitalizeTitle('this is A great title')='This Is a Great Title'


CAST

the value of the second parameter

Name Type Description Optional
Return Value Any the value of the second parameter No
Parameter 1 type Any the type we want to cast to. No
Parameter 2 theObject Any the object that should be casted. No

Example:

CAST(Employee,$theObject)


CatalogueDelete

Extension: Functions

Deletes the row with the given id from the given Catalog. This function will only operate on a Catalog with a Static Catalog Source. The edited Catalog will not be committed.

Name Type Description Optional
Return Value Nothing No
Parameter 1 catalogId String the name of the Catalog No
Parameter 2 rowid String the Id of the row to be deleted. No

Example:

CatalogueDelete($catalog, $rowid)


CatalogueUpdate

Extension: Functions

Update the entry in the given Catalog with the given id using the given key value pairs. This function will only operate on a Catalog with a Static Catalog Source. The edited Catalog will not be committed.

Name Type Description Optional
Return Value Record Update the entry in the given Catalog with the given id using the given key value pairs. This function will only operate on a Catalog with a Static Catalog Source. The edited Catalog will not be committed. No
Parameter 1 catalogId String the Id of the Catalog No
Parameter 2 rowId String the Id of the row to be updated. If this Id is null a new row will be inserted with newId=MAX(id)+1 No
Parameter 3 propertyMap Named String the name value pairs that hold the information for the Catalog No

Example:

CatalogueUpdate($catalog, $rowid, $propertymap)


CEIL

Round the given value to the next higher integer.

Name Type Description Optional
Return Value Integer round the given value to the next higher integer No
Parameter 1 value Double the value that must be rounded No

Example:

CEIL(1.234)=2


CHAR

Returns the character for the given decimal number

Name Type Description Optional
Return Value String String with single character No
Parameter 1 number Integer Decimal character value (Unicode code point) No

Example:

CHAR(65) = 'A'


CHECKACCESSLICENSE

Test if the current User has a valid Access License for the given Module (default: Workspace). If there is no Access License assigned to this User but there are free Access Licenses, the function may assign one (default: false).

Name Type Description Optional
Return Value Boolean Returns true if the User has a valid Access License No
Parameter 1 userId String User Id No
Parameter 2 module String Module Yes
Parameter 3 assign Boolean Whether to assign an Access License to the User or not Yes

Example:

CHECKACCESSLICENSE(USERID(), 'Workspace', false)


CHECKCONSTRAINT

Deprecated

Check all constraints for a given data path.

Name Type Description Optional
Return Value Any Check constraints defined on the given entity and property. return list of all constraint violations (com.nm.sdk.data.dataitems.ConstraintViolation). No
Parameter 1 dataEntity Any the data entity which must be checked No
Parameter 2 propertyName String the name of a property that must be checked Yes

Example:

CHECKCONSTRAINT($person[1],theProperty)


CHECKSYNTAX

Return true if the given expression is syntactically correct.

Name Type Description Optional
Return Value Boolean true if the given expression is syntactically correct No
Parameter 1 expression String a string No

Examples:

CHECKSYNTAX('true')==true
CHECKSYNTAX('$you.say.hello - $i.say.goodbye')==true
CHECKSYNTAX('$1 + @rubish')==false


CLEANDIRECTORY

Cleans a directory (deleting its content). Relative paths are interpreted relative to the Data Home.

Name Type Description Optional
Return Value Boolean Returns true if the operation was successful No
Parameter 1 path String The directory to clean No

Example:

CLEANDIRECTORY('uploads/2006')


CLONE

Create a clone of the given data entity.

Name Type Description Optional
Return Value Any create a clone of the given data entity No
Parameter 1 dataEntity Any the data entity which must be copied No
Parameter 2 deepClone Boolean make a deep clone (copies sub structures, default is true) Yes
Parameter 3 cloneMetaData Boolean indicates whether the metadata should be cloned aswell (default is false) Yes

Example:

CLONE($person[1])


ClusterCacheClear

Remove all objects from the cluster cache.

Name Type Description Optional
Return Value Nothing No

Example:

ClusterCacheClear();


ClusterCacheLookup

Return the object with the given name in the cluster cache.

Name Type Description Optional
Return Value Any Return the object with the given name in the cluster cache. No
Parameter 1 name String the name of the cached object. No

Example:

$cachedObject:=ClusterCacheLookup('myobject');


ClusterCacheNames

Return an indexed collection of all object names in the cluster cache. This function does not check if the cache entries have expired.

Name Type Description Optional
Return Value Indexed String Return an indexed collection of all object names in the cluster cache. This function does not check if the cache entries have expired. No
Parameter 1 pattern String Optional regex pattern to match names against. Yes

Example:

$names := ClusterCacheNames('user.*')


ClusterCacheRemove

Remove the object with the given name from the cluster cache.

Name Type Description Optional
Return Value Any Remove the object with the given name from the cluster cache. No
Parameter 1 name String the name of the cached object. No

Example:

ClusterCacheRemove('myobject');


ClusterCacheStore

Store the given serializable object with the given name in the cluster cache. If no timeToLive (optional parameter) is given, or it is -1, the entry will be removed from the cache after the default time-to-live as configured in nm.cluster.cache.ttl.

Name Type Description Optional
Return Value Any Store the given serializable object with the given name in the cluster cache. If no timeToLive (optional parameter) is given, or it is -1, the entry will be removed from the cache after the default time-to-live as configured in nm.cluster.cache.ttl. No
Parameter 1 name String the name of the object to cache. No
Parameter 2 object Any the serializable object to be stored in the application cache. No
Parameter 3 retentionExpression Any an expression that returns true as long as the object is valid. The expression may use the implicit variable $insertTimestamp (Long, the time when the object was stored or updated in the cluster cache in milliseconds) to make the decision. Yes
Parameter 4 timeToLive Long the amount of time in seconds after which the cluster cache entry should be removed. If you supply 0, the entry will never expire (until the system is shutdown). If no timeToLive is given, or it is -1, the default time-to-live as configured in nm.cluster.cache.ttl will be used. Yes

Example:

ClusterCacheStore('myobject',$cachedObject);


CommitBusinessObject

Extension: Functions

Commit the businessobject with the given id and type, return true if commited

Name Type Description Optional
Return Value Boolean Commit the businessobject with the given id and type, return true if commited No
Parameter 1 id String the id of the business object No
Parameter 2 type String the type of the business object No
Parameter 3 comment String the commit comment Yes

Example:

CommitBusinessObject($id, $type)


CommitBusinessObjects

Extension: Functions

Commit the business objects given in the indexed collection parameter as object version references, return true if committed.

Name Type Description Optional
Return Value Boolean Commit the business objects given in the indexed collection parameter as object version references, return true if committed. No
Parameter 1 objectVersionRefs Indexed Any indexed collection of type Any with ObjectVersionRef for the objects to be committet No
Parameter 2 comment String the commit comment Yes

Example:

CommitBusinessObjects($businessObjectsList,$comment)


CommitProcessInstance

Commit thread-local changes related to the given process instance.

Name Type Description Optional
Return Value Nothing No
Parameter 1 processInstanceId String the ID of the process instance to commit. No

Example:

CommitProcessInstance('1414515505935');


COMPONENTPATH

Returns the current component path. If the function is not called in a Screen context, null is returned.

Name Type Description Optional
Return Value String Component Path No

Example:

COMPONENTPATH() = '/root/3/2/root/4/[5]/10'


CompressFile

Extension: Functions

Compresses a file

Name Type Description Optional
Return Value Nothing No
Parameter 1 sourcePath String the path to the file to compress No
Parameter 2 targetPath String the path to the compressed file to write No
Parameter 3 method String the compression method ('gz' or 'bzip2'). Default = 'gz' Yes

Example:

CompressFile($sourcePath, $targetPath)


CONCAT

Return the concatenation of the three arguments, i.e. a new string consisting of the three given strings.

Name Type Description Optional
Return Value String the concatenation of the three arguments No
Parameter 1 arg1 String a string No
Parameter 2 arg2 String a string added between the values of arg1 and arg3 if they are none empty No
Parameter 3 arg3 String a string No

Examples:

CONCAT('1','-','2')='1-2'
CONCAT('John',' ','Woo')='John Woo'


CONF

Get the configuration value associated to the given key, return the default value if the key was not found.

Name Type Description Optional
Return Value String the configuration value associated to the given key, return the default value if the key was not found No
Parameter 1 key String the property name No
Parameter 2 default String the default value, returned if the key is not found Yes

Example:

CONF('nm.data.home','some value') = path to NM home


CONTAINS

Return true if the given string-delimited list contains the given element. Only use this function to compare lists; to compare strings, use the MATCH function.

Name Type Description Optional
Return Value Boolean true if the string-delimited list arg1 contains arg2 No
Parameter 1 arg1 String the list string to search for arg2 No
Parameter 2 arg2 String value to search for in arg1 No
Parameter 3 delim String the optional delimiter value, default is '|' Yes

Examples:

CONTAINS('1|2|3','2','|')=true
CONTAINS('John;Jack;James','Jim',';')=false


CONTEXT

Get the Nm context.

Name Type Description Optional
Return Value Context Get the Nm context No

Example:

CONTEXT()


CONTEXTPATH

Returns the web application's context path. If the web application doesn't have a context path, an empty string is returned. If the context path can not be determined (e.g. because the function is not called within a HTTP request context), null is returned.

Name Type Description Optional
Return Value String Context path of the web application No

Example:

CONTEXTPATH() = '/nm5'


ConvertImage

Extension: Functions

Convert an Image into an other format. Supported input formats: BMP, GIF, JPEG, JPG, PNG, WBMP. Supported output formats: BMP, GIF, JPEG, JPG, PNG, WBMP.

Name Type Description Optional
Return Value Nothing No
Parameter 1 file1 String Input image file path No
Parameter 2 file2 String Output image file path No

Example:

ConvertImage($file1, $file2)


COPYDIRECTORY

Copy a directory to a new location. If the target directory already exists, this function will merge the source directory into the target directory. If the parent directory of the target directory doesn't exist, it will be created. Relative paths are interpreted relative to the Data Home.

Name Type Description Optional
Return Value Boolean Returns true if the operation was successful No
Parameter 1 sourcePath String The directory to copy No
Parameter 2 targetPath String The target location No

Example:

COPYDIRECTORY('uploads/2006','uploads/archive/2006')


COPYFILE

Copy a file to a new location. If the target file already exists, this function will overwrite it. If the target is a directory, a file with the same name like the source file will be created in it. If the directory of the target file doesn't exist, it will be created. Relative paths are interpreted relative to the Data Home.

Name Type Description Optional
Return Value Boolean Returns true if the operation was successful No
Parameter 1 sourcePath String The file to copy No
Parameter 2 targetPath String The target location No

Example:

COPYFILE('infos.xml','content/infos.xml')


CopyFileToStream

Extension: Functions

copies the file at the given location to the given stream

Name Type Description Optional
Return Value Nothing No
Parameter 1 filepath String the path to the file No
Parameter 2 stream Any the stream to be copied to, i.e. HTTPRESPONSE().getOutputStream() No

Example:

CopyFileToStream($filepath,$stream)


COS

Extension: Functions

Cosine

Name Type Description Optional
Return Value Double Cosine No
Parameter 1 value Double Angle No

Example:

COS(PI())


CREATEDIRECTORY

Create a directory. Parent directories are created if needed. If the directory already exists, this function does nothing. Relative paths are interpreted relative to the Data Home.

Name Type Description Optional
Return Value Boolean Returns true if the operation was successful No
Parameter 1 path String The directory to create No

Example:

CREATEDIRECTORY('uploads/2006')


CreateNotificationTopic

Create a notification topic with the given Id. If the topic already exists, a warning is logged.

Name Type Description Optional
Return Value Nothing No
Parameter 1 topic String The Id of the topic. No
Parameter 2 description String A user-readable description of the topic. Yes
Parameter 3 name String A user-readable name for the topic. Yes

Example:

CreateNotificationTopic('new-american-client')


CREATEPROTOTYPE

A null initialized object

Name Type Description Optional
Return Value Any A null initialized object No
Parameter 1 className Any the name of the dataclass No

Example:

CREATEPROTOTYPE(ClassName)


CreateUser

Extension: Functions

Returns the user that has been created.

Name Type Description Optional
Return Value User Returns the user that has been created. No
Parameter 1 userId String The userId of the user to be created No

Example:

CreateUser('userId')


CreateWorkflowToken

Extension: Functions

[no description]

Name Type Description Optional
Return Value Boolean [no description] No
Parameter 1 workflowInstanceId String Workflow Instance or Sub-Workflow Token Id No
Parameter 2 elementId Integer Workflow Element Id No

Example:

CreateWorkflowToken($workflowTokenId)


CreateXmlDocument

Extension: Functions

Create a new XML document element.

Name Type Description Optional
Return Value XmlDocument Create a new XML document element. No

Example:

CreateXmlDocument


CropImage

Extension: Functions

Crop an image to a given area. Supported input formats: BMP, GIF, JPEG, JPG, PNG, WBMP. Supported output formats: BMP, GIF, JPEG, JPG, PNG, WBMP.

Name Type Description Optional
Return Value Nothing No
Parameter 1 file1 String Input image file path No
Parameter 2 file2 String Output image file path (pass null to overwrite input file) No
Parameter 3 top Integer X position of clipping region No
Parameter 4 left Integer Y position of clipping region No
Parameter 5 width Integer Width of clipping region No
Parameter 6 height Integer Height of clipping region No

Example:

ClipImage($file1, $file2, 10, 10, 200, 120)


CustomListById

Returns a CustomList given a CustomList ID

Name Type Description Optional
Return Value CustomList Returns a CustomList given a CustomList ID No
Parameter 1 customListId String The CustomList's ID (note that this is different from its display name) No

Example:

$myNewCustomList := CustomListById($myCustomList.getId())


CustomListChildren

Given a CustomList, this function returns all of its children (i.e. CustomLists which appear immediately below the given CustomList in the Business Object Browser Custom List tree view).

Name Type Description Optional
Return Value Indexed CustomList Returns an Indexed List of CustomLists No
Parameter 1 customList CustomList The CustomList whose children should be returned No

Example:

$children := CustomListChildren($myCustomList)


CustomListContent

Given a CustomList, this function returns the BusinessObjects it contains (i.e. BusinessObjects which appear when clicking on the given CustomList in the Business Object Browser Custom List tree view).

Name Type Description Optional
Return Value Indexed BusinessObject Returns an Indexed List of BusinessObjects No
Parameter 1 customList CustomList The CustomList whose content should be returned No

Example:

$content := CustomListContent($myCustomList)


CustomListRoot

Get an Indexed List containing all root Custom Lists.

Name Type Description Optional
Return Value Indexed CustomList Returns an Indexed List containing all root Custom Lists No

Example:

CustomListRoot()


CustomProcessLogEntry

Deprecated

This function is not supported anymore in Appway 6.0 and newer. It always returns 0.

Name Type Description Optional
Return Value Long Create a custom log entry in the Process Log No
Parameter 1 logLevel String Log level No
Parameter 2 event String Event No
Parameter 3 value Any Value Yes

Example:

CustomProcessLogEntry('WorkflowInstance','Forward',WORKFLOWINSTANCEID(),$forwardUser)


CypherText

Extension: Functions

Encrypt or Decrypt the given text.

Name Type Description Optional
Return Value String Encrypt or Decrypt the given text. No
Parameter 1 text String the text to be en-/de-crypted No
Parameter 2 pw String the cypher password Yes
Parameter 3 encrypt Boolean if set to false the given text will be de-crypted otherwise en-crypted (default: true -> encryption) Yes

Example:

CypherText($text, $encrypt)


DataEntityToXml

Extension: Functions

create an xml document from the given data entity

Name Type Description Optional
Return Value XmlDocument create an xml document from the given data entity No
Parameter 1 dataEntity Any the dataEntity to be put into a xml document No

Example:

 DataEntityToXml($dataEntity)


DATAHANDLEURL

Build an URL to access a data handle given the type and id of the business object and the property name of the data handle. The return value starts with /resource/datahandle and doesn't contain the context path.

Name Type Description Optional
Return Value String URL without host and context path No
Parameter 1 type String Business object type No
Parameter 2 id String Business object id No
Parameter 3 property String Business object property No
Parameter 4 filter String Version filter Yes

Example:

DATAHANDLEURL('PdfOutput','D02319-en','pdfFile') = '/resource/datahandle/PdfOutput/D02319-en/LatestCommittedFilter/pdfFile'


DATAPATH

Build the absolute path of a file in the Nm Data Home.

Name Type Description Optional
Return Value String the absolute path of a file in the Nm Data Home. No
Parameter 1 path String the relative path inside the Nm Data Home No

Example:

DATAPATH('conf/content.properties')


DataTableModel

An instance of a Data Class Model

Name Type Description Optional
Return Value Any An instance of a Data Class Model No
Parameter 1 type Any The Data Class No
Parameter 2 id String The id of the Data Class Model instance No

Example:




DATEADD

Calculate the date that result from adding the given units to the given date.

Name Type Description Optional
Return Value Date the date that results from adding the given value to the given date No
Parameter 1 date Date the date to which we add the units No
Parameter 2 amount Integer the amount to be added to the given date No
Parameter 3 unit String the amount's unit [Y: year, M: month, D: day, h: hour, m: minute, s: second, ms: millisecond] Yes

Examples:

DATEADD('2006-1-1',2,'Y')='2008-1-1'
DATEADD('2006-1-1',2,'M')='2006-3-1'
DATEADD('2006-1-1',2,'D')='2006-1-3'


DATECOMPARE

Compare two dates A and B. The Function returns a negative value if A is before B; 0 if A and B are at the same time; and positive value if A is after B. Use the following abbreviations for precision: Y/y for year, M for month, W/w for week, D/d for day, H/h for hour, m for minute, s for second and S for millisecond

Name Type Description Optional
Return Value Integer -1 if date1<date2, 0 if date1==date2, 1 if date1>date2 No
Parameter 1 date1 Date the first date No
Parameter 2 date2 Date the second date No
Parameter 3 nullLast Boolean null values after all other dates Yes
Parameter 4 precision String unit of precision Yes

Examples:

DATECOMPARE('2001-01-01','2006-01-01')=-1
DATECOMPARE('2001-01-01','2001-01-01')=0
DATECOMPARE('2001-01-01','2000-01-01')=1


DATEFIELD

Get a field value of a date. Valid units: y for year, M for month, w for week in year, W for week in month, D for day in year, d for day in month, F for day of week in month, E for day in week, a for AP/PM, H for hour in day (0-23), k for hour in day (1-24), K for hour in AM/PM (0-11), h for hour in AM/PM (1-12), m for minute, s for second, S for millisecond and Z for time zone offset

Name Type Description Optional
Return Value Integer the date that results from adding the given timespan to the given date No
Parameter 1 date Date input date No
Parameter 2 unit String unit to return No

Examples:

DATEFIELD('2006-01-01','y')=2006
DATEFIELD('2006-01-01 13:27:21','H')=13


DATEFORMAT

Format a date according to a pattern. Valid pattern letters: y for year (1996, 96), M for month in year (July, Jul, 07, 7), w for week in year (27), W for week in month (2), D for day in year (187), d for day in month (10), F for day of week in month (2), E for day of week (Tuesday, Tue), a for AM/PM marker, H for hour in day (0-23), k for hour in day (1-24), K for hour in am/pm (0-11), h for hour in am/pm (1-12), m for minute in hour, s for second in minute, S for millisecond (0-999), z for general time zone, Z for RFC 822 time zone

Name Type Description Optional
Return Value String Format a date according to the given arguments No
Parameter 1 date Date the date that will be formatted No
Parameter 2 pattern String the pattern specifying the format No
Parameter 3 locale String the language code Yes
Parameter 4 timeZone String the time zone Yes

Examples:

DATEFORMAT(NOW(),'dd.MM.yyyy','ch') = 01.02.2006
DATEFORMAT(TODAY(),'MM/dd/yyyy','ch') = 02/01/2006


DATEPARSE

Parse a date according to a pattern.

Name Type Description Optional
Return Value Date the parsed date No
Parameter 1 dateString String the date string No
Parameter 2 pattern String the date pattern No
Parameter 3 locale String the language code Yes
Parameter 4 timeZone String the time zone Yes

Example:

DATEPARSE('2006-01-23','yyyy-MM-dd')=the date


DAYSSINCE

Calculate the days since the given date.

Name Type Description Optional
Return Value Double calculate the days since the given date No
Parameter 1 date Date the date No

Example:

DAYSSINCE('2006-01-23')=number of days


DECODETEXT

Decode text encoded with Hex, Base64, Quoted Printable, URL, MIME, MIME-Q or MIME-B codec.

Name Type Description Optional
Return Value String Decode text encoded with Hex or Base64 No
Parameter 1 text String The text to be decoded No
Parameter 2 encoding String Encoding (UTF-8 by default) Yes
Parameter 3 codec String Hex, Base64, Quoted, URL, MIME, MIME-Q or MIME-B codec (Hex by default) Yes

Examples:

DECODETEXT('48656c6c6f','UTF-8','hex') = 'Hello'
DECODETEXT('SGVsbG8=','ISO-8859-1','base64') = 'Hello'


DecompressFile

Extension: Functions

Decompresses a file

Name Type Description Optional
Return Value Nothing No
Parameter 1 sourcePath String the path to the file to decompress No
Parameter 2 targetPath String the path to the decompressed file to write No
Parameter 3 method String the compression method ('gz' or 'bzip2'). Default = 'gz' Yes

Example:

DecompressFile($sourcePath, $targetPath)


DecryptText

Extension: Functions

Decrypt the given text using the given encryption-key-alias

Name Type Description Optional
Return Value String Decrypt the given text using the given encryption-key-alias No
Parameter 1 keyAlias String The encryption key alias to be used for decryption No
Parameter 2 encryptedText String The text to be decrypted No

Example:

DecryptText('my-key-alias','text to be decrypted')


DELETECLUSTERFILE

Delete the cluster file at the given filepath. If the file does not exist, nothing is done.

Name Type Description Optional
Return Value Nothing No
Parameter 1 filepath String The path to the file to delete. No

Example:

DELETECLUSTERFILE('foo/bar/thefile.txt')


DELETEDIRECTORY

Delete a directory. Relative paths are interpreted relative to the Data Home.

Name Type Description Optional
Return Value Boolean Returns true if the operation was successful No
Parameter 1 path String The directory to delete No

Example:

DELETEDIRECTORY('uploads/2006')


DELETEFILE

Delete a file. Relative paths are interpreted relative to the Data Home.

Name Type Description Optional
Return Value Boolean Returns true if the operation was successful No
Parameter 1 path String The file to delete No

Example:

DELETEFILE('infos.xml')


DeleteNotificationTopic

Delete the notification topic (and all its subscriptions) with the given Id. If the topic does not exists, a warning is logged.

Name Type Description Optional
Return Value Nothing No
Parameter 1 topic String The Id of the topic. No

Example:

DeleteNotificationTopic('new-american-client')


DeleteProcessInstance

Delete a Process Instance.

Name Type Description Optional
Return Value Nothing No
Parameter 1 processInstanceId String Process Instance Id No

Example:

DeleteProcessInstance('129409273901')


DeleteUser

Extension: Functions

Nothing.

Name Type Description Optional
Return Value Nothing No
Parameter 1 user String The userId of the user to be deleted. No

Example:




DeleteWorkflowToken

Extension: Functions

[no description]

Name Type Description Optional
Return Value Boolean [no description] No
Parameter 1 workflowTokenId String Workflow Token Id No

Example:

DeleteWorkflowToken($workflowTokenId)


DESERIALIZE

Deserialize the given data.

Name Type Description Optional
Return Value Any Deserialize the given data. No
Parameter 1 data String The data to be deserialized. No

Example:

DESERIALIZE($data)


DIFFERENCE

Return the difference of two indexed collections, i.e. a list containing every object in the first list that is not also in the second list. DEFFERENCE($c1,$c2) == $c1 ∖ $c2

Name Type Description Optional
Return Value Indexed Any Difference (subtract) of two indexed collections No
Parameter 1 collection Indexed Any an indexed collection No
Parameter 2 collection Indexed Any an indexed collection No

Example:

DIFFERENCE($collection1,$collection2)


DIR

Get the content of the given directory.

Name Type Description Optional
Return Value Indexed Any The content of the given directory No
Parameter 1 pathToDirectory String the path to the directory No
Parameter 2 filter Any expression used for filtering the content Yes

Example:

DIR('{DATA_HOME}/tmp')=List<java.io.File>


DIRECTORYEXISTS

Check if a directory exists. Relative paths are interpreted relative to the Data Home.

Name Type Description Optional
Return Value Boolean Returns true if the directory already exists No
Parameter 1 path String The directory to check No

Example:

DIRECTORYEXISTS('uploads/2006')


DIRECTORYSIZE

Returns the size of a directory in bytes. If the directory doesn't exist or if path denotes a file, -1 is returned. Relative paths are interpreted as relative to the Data Home.

Name Type Description Optional
Return Value Long Returns the size of a directory in bytes No
Parameter 1 path String The directory path No

Example:

DIRECTORYSIZE('content')==2131231


DIV

Divide two real (floating point) numbers.

Name Type Description Optional
Return Value Number the division result No
Parameter 1 dividend Number the number that has to be divided No
Parameter 2 divisor Number the number through which the dividend is divided No
Aliases "/"

Examples:

DIV(12.0,2.0)=6.0
DIV(13.0,2.0)=6.5


DIVV

Calculate the integer division of the given arguments.

Name Type Description Optional
Return Value Integer the integer division result No
Parameter 1 dividend Number the number that will be divided No
Parameter 2 divisor Integer the number that divides the dividend No
Aliases "div"

Examples:

DIVV(12,2)=6
DIVV(13,2)=6
DIVV(13.0,2.0)=6
DIVV(13.9,2)=error (13.9 can't be converted to an integer)
DIVV(13,2)=6


DNSLookup

Extension: Functions

Lookup a Hostname and return am IP Address. If the Hostname cannot be resolved, null is returned.

Name Type Description Optional
Return Value String IP Address No
Parameter 1 hostname String Hostname No

Example:

DNSReverseLookup('client021.bank.local') = '172.16.3.211'


DNSReverseLookup

Extension: Functions

Lookup an IP Address and return a fully qualified Hostname (FQDN). If the IP Address cannot be resolved, either null or the IP Address is returned.

Name Type Description Optional
Return Value String Fully qualified Hostname No
Parameter 1 ipAddress String IP Address No

Example:

DNSReverseLookup('172.16.3.211') = 'client021.bank.local'


DOCUMENTSETACTIONS

Generate a list of Action objects based on the contents of a Document Set.

Name Type Description Optional
Return Value Indexed Action return a list of Action objects for a given Document Set No
Parameter 1 documentSetId String Document Set Id No
Parameter 2 input Boolean Create Screen Actions Yes
Parameter 3 output Boolean Create PDF Output Actions Yes
Parameter 4 recursive Boolean Include nested Document Sets Yes

Example:

DOCUMENTSETACTIONS('Switzerland',true,false,true);


DROPSTRUCTURE

Remove the given structure from the system.

Name Type Description Optional
Return Value Nothing nothing No
Parameter 1 structure String the name of the structure No
Aliases "DROPTYPE"

Example:

DROPSTRUCTURE('Person')


EMPTY

Check if the given text is an empty string.

Name Type Description Optional
Return Value Boolean true if the given argument is an empty string No
Parameter 1 argument String the text we want to check No

Examples:

EMPTY('')=true
EMPTY('John')=false


ENCODETEXT

Encode text with Hex, Base64, Quoted Printable, URL, MIME, MIME-Q or MIME-B codec.

Name Type Description Optional
Return Value String Encode text with Hex or Base64 No
Parameter 1 text String The text to be encoded No
Parameter 2 encoding String Encoding (UTF-8 by default) Yes
Parameter 3 codec String Hex, Base64, Quoted, URL, MIME, MIME-Q or MIME-B codec (Hex by default) Yes

Examples:

ENCODETEXT('Hello','UTF-8','hex') = '48656c6c6f'
ENCODETEXT('Hello','ISO-8859-1','base64') = 'SGVsbG8='


ENCODETEXTMD5

Encode text as MD5 with Hex or Base64.

Name Type Description Optional
Return Value String Encode text as MD5 with Hex or Base64 No
Parameter 1 text String The text to be encoded No
Parameter 2 encoding String Encoding (UTF-8 by default) Yes
Parameter 3 codec String Hex or Base64 codec (Hex by default) Yes

Examples:

ENCODETEXTMD5('Hello','UTF-8','hex') = '8b1a9953c4611296a827abf8c47804d7'
ENCODETEXTMD5('Hello','ISO-8859-1','base64') = 'ixqZU8RhEpaoJ6v4xHgE1w=='


ENCODEURL

Encode URL special characters.

Name Type Description Optional
Return Value String Encode URL special characters. No
Parameter 1 text String The text to be encoded No
Parameter 2 encoding String The encoding. The text will first be transformed to the given encoding and then encoded. Note: The World Wide Web Consortium Recommendation states that 'UTF-8' should be used. Not doing so may introduce incompatibilities. (Default = 'UTF-8') Yes

Example:

ENCODEURL('Hello World')='Hello%20World'


ENCRYPTPATH

Encrypt a file system path. This function can be used to pass a path to streaming components like FileSystemServlet or ImageScaler.

Name Type Description Optional
Return Value String Encrypted Path No
Parameter 1 path String The path to be encrypted No

Example:

ENCRYPTPATH('D:/uploads/image.gif')='rial82ja23lsd9asldk9das'


EncryptText

Extension: Functions

Encrypt the given text using the given encryption-key-alias

Name Type Description Optional
Return Value String Encrypt the given text using the given encryption-key-alias No
Parameter 1 keyAlias String The encryption key alias to be used for encryption No
Parameter 2 text String The text to be encrypted No

Example:

EncryptText('my-key-alias','text to be encrypted')


EncryptUserPassword

Extension: Functions

Returns the encrypted password.

Name Type Description Optional
Return Value String Returns the encrypted password. No
Parameter 1 password String The cleartext password to be encrypted No

Example:

EncryptUserPassword('mySecretPass')


ENDSWITH

Check if a text ends with a given postfix.

Name Type Description Optional
Return Value Boolean true if the text ends with the given postfix No
Parameter 1 text String text No
Parameter 2 prefix String postfix No

Examples:

ENDSWITH('file.xml','.xml')=true
STARTSWITH('John Peter','John')=false


EQUAL

Return true if all arguments are equal.

Name Type Description Optional
Return Value Boolean true if all paramters are equal No
Parameter 1 object java.lang.Object the first object that should be compared No
Parameter 2 object java.lang.Object the second object that should be compared No
Parameter 3 object java.lang.Object the third object that should be compared Yes
Aliases "=="

Examples:

EQUAL(1,1)=true
EQUAL(1,1,1)=true
EQUAL(1,2)=false
EQUAL(1,1,2)=false


ERROR

Evaluate the first argument and return its value if no error occurs, otherwise evaluate the second argument and return its value. The implicite variable $excpetion can be used to access the exception object.

Name Type Description Optional
Return Value Any the value of the first expression if no error occured while evaluating it, otherwise the value of the second expression No
Parameter 1 expr1 Any the expression that could throw an error No
Parameter 2 expr2 Any the expression returned in case an error was thrown by expr1 No

Example:

ERROR(expr1,expr2)


ESBSendMessage

Deprecated

Send a message through the message routing system.

Name Type Description Optional
Return Value Any Send a message through the message routing system. No
Parameter 1 integrationLinkId String the id of the integration link the message must be sent to No
Parameter 2 parameterAssignments Named Any the parameter assignments for the integration link No
Parameter 3 message Any the message to be sent No
Parameter 4 headerMap Named String the message header (optional) Yes
Parameter 5 waitForReply Boolean wait for a reply. true: do wait, false: do not wait (default) Yes

Example:

ESBSendMessage($linkId,$message,$headers, $waitForReply)


ESCAPEHTML

Escape HTML special characters.

Name Type Description Optional
Return Value String Escape HTML special characters No
Parameter 1 string String The text to be escaped No

Examples:

ESCAPEHTML('5 > 3')='5 &gt; 3'
ESCAPEHTML('<b>hello</b>')='&lt;b&gt;hello&lt;/b&gt;'


ESCAPEJAVASCRIPT

Escape JavaScript special characters

Name Type Description Optional
Return Value String Escape JavaScript special characters No
Parameter 1 string String The text to be escaped No

Examples:

ESCAPEJAVASCRIPT("I don't like coffee")="I don\'t like coffee"
ESCAPEJAVASCRIPT('He said: "Stopp!"')='He said: \"Stopp!\"'


ESCAPEXML

Escape XML special characters.

Name Type Description Optional
Return Value String Escape XML special characters No
Parameter 1 string String The text to be escaped No

Examples:

ESCAPEXML('5 > 3')='5 &gt; 3'
ESCAPEXML('<b>hello</b>')='&lt;b&gt;hello&lt;/b&gt;'


EVAL

Evaluate the argument string containing an Expression and return the evalution's result.

Name Type Description Optional
Return Value Any the result of the evaluation of the argument string No
Parameter 1 expressionString String the string with the expression that must be evaluated No

Examples:

EVAL('1+2')=3
EVAL('EVAL("1+2")')=3


EVALUATERULE

Evaluate the given rule and return the actions that were triggered.

Name Type Description Optional
Return Value Indexed Action Evaluate the given rule and return the actions that were triggered. No
Parameter 1 ruleId String The rule identifier. No

Example:

EVALUATERULE('ruleId')


EVALUATERULESET

Evaluate the given ruleset and return the actions that were triggered.

Name Type Description Optional
Return Value Indexed Action Evaluate the given ruleset and return the actions that were triggered. No
Parameter 1 ruleSetId String The ruleset identifier. No

Example:

EVALUATERULESET('ruleSetId')


ExceptionRootCause

Root cause

Name Type Description Optional
Return Value Exception Root cause No
Parameter 1 exception Exception exception No

Example:

ExceptionRootCause($exception)


ExcludeFromNotificationSubscription

Exclude the given user from the subscription of a group/role to the given topic via the given channel. If no delivery channel is supplied, the exclusion will affect the Appway delivery channel.

Name Type Description Optional
Return Value Nothing No
Parameter 1 userId String The Id of the user to exclude from the subscription. No
Parameter 2 subscriberId String The Id of the group/role from whose subscription to exclude the given user. No
Parameter 3 topic String The Id of the topic. No
Parameter 4 deliveryChannelId String The Id of the notification delivery channel. Default is 'appway' Yes

Example:

ExcludeFromNotificationSubscription(USERID(), 'GROUP:accountManagersUSA', 'new-american-client')


EXEC

Execute a system command.

Name Type Description Optional
Return Value String Return code No
Parameter 1 command String command to execute No
Parameter 2 wait Boolean wait until process ends Yes
Parameter 3 input String input file path (null to disabled input stream) Yes
Parameter 4 output String output file path (null to discard output or 'STDOUT' to redirect to STDOUT, prefix file path with '>' to append output to the file) Yes
Parameter 5 error String error file path (null to discard error output, 'STDERR' to redirect to STDERR or 'OUT' to redirect to the output file, prefix file path with '>' to append output to the file) Yes
Parameter 6 argument 1 String argument 1 Yes
Parameter 7 argument ... String argument ... Yes

Example:

EXEC('ping.exe',true,null,null,null,'10.0.0.10')=0


EXECUTIONCONTEXT

Get the execution context.

Name Type Description Optional
Return Value ExecutionContext Execution context No

Example:

EXECUTIONCONTEXT()


EXECUTIONCONTEXTATTRIBUTE

Get the value of an execution context attribute. The function returns null if attribute is not defined.

Name Type Description Optional
Return Value Any value of the execution context attribute No
Parameter 1 name String name of the execution context attribute No

Example:

EXECUTIONCONTEXTATTRIBUTE('javax.servlet.http.HttpServletRequest')


ExistsBusinessObject

Check if the a version of the requested BusinessObject exists.

Name Type Description Optional
Return Value Boolean Check if the a version of the requested BusinessObject exists. No
Parameter 1 type String the type of the requested BusinessObject. No
Parameter 2 id String the id of the requested BusinessObject. No
Parameter 3 versionFilter Any the version filter for searching the business object Yes

Example:

ExistsBusinessObject('DataType','String')


ExistsDataClass

Check if the dataclass with the given name already exists.

Name Type Description Optional
Return Value Boolean Check if the dataclass with the given name already exists. No
Parameter 1 name String the name of the Data Class. No

Example:

ExistsDataClass('String')


EXN

the execution tree of the given expression

Name Type Description Optional
Return Value Any the execution tree of the given expression No
Parameter 1 expression Any the expression whose execution tree must be returned No

Example:

EXN($a+$b)


EXP

Return Euler's number 'e' raised to the power of the argument value.

Name Type Description Optional
Return Value Number Returns Euler's number 'e' raised to the power of the argument value. No
Parameter 1 argument Double the exponent No

Example:

EXP(2)=e^2


FAIL

Throw an exception.

Name Type Description Optional
Return Value Nothing this function always throws an exception No
Parameter 1 message String the message that should appear in the log Yes

Examples:

FAIL()
FAIL('An unrecoverable error occured while squaring a circle')


FileChecksum

Extension: Functions

Checksum for a file as an hexadecimal string

Name Type Description Optional
Return Value String Checksum for a file as an hexadecimal string No
Parameter 1 path String The path to the file to build the checksum from No
Parameter 2 algorithm String The algorithm to use (default: 'MD5') Yes
Parameter 3 provider String The Cryptographic Service Provider to use (default: none) Yes

Examples:

FileChecksum('C:\Temp\file.dat') = '8b1a9953c4611296a827abf8c47804d7'
FileChecksum('C:\Temp\file.dat', 'MD5') = '8b1a9953c4611296a827abf8c47804d7'
FileChecksum('C:\Temp\file.dat', 'MD5', 'SUN') = '8b1a9953c4611296a827abf8c47804d7'


FILEEXISTS

Check if a file exists. Relative paths are interpreted relative to the Data Home.

Name Type Description Optional
Return Value Boolean Returns true if the file already exists No
Parameter 1 path String The file to check No

Example:

FILEEXISTS('infos.xml')


FILEEXTENSION

Returns the file extension of a file given its path.

Name Type Description Optional
Return Value String Returns the file extension of a file given its path No
Parameter 1 path String The file path No

Example:

FILEEXTENSION('content/infos.xml')=='xml'


FILEMODIFICATIONTIME

Returns the modification time of a file or directory as timestamp. If the file or directory doesn't exist, -1 is returned. Relative paths are interpreted as relative to the Data Home.

Name Type Description Optional
Return Value Long Returns the modification time of a file or directory as timestamp No
Parameter 1 path String The file path No

Example:

FILEMODIFICATIONTIME('content/infos.xml')==10552131231


FILENAME

Returns the name of a file or directory (the part of the path after the last path separator).

Name Type Description Optional
Return Value String Returns the name of a file or directory given its path No
Parameter 1 path String The file path No

Example:

FILENAME('content/infos.xml')=='infos.xml'


FILESIZE

Returns the size of a file in bytes. If the file doesn't exist or if path denotes a directory, -1 is returned. Relative paths are interpreted as relative to the Data Home.

Name Type Description Optional
Return Value Long Returns the size of a file in bytes No
Parameter 1 path String The file path No

Example:

FILESIZE('content/infos.xml')==2131231


FILESYSTEMURL

Build an URL to access a file on the file system given the path to the file. Relative paths are interpreted as relative to the data home. The return value starts with /filesystem and doesn't contain the context path.

Name Type Description Optional
Return Value String URL without host and context path No
Parameter 1 path String Path to file No

Example:

FILESYSTEMURL('uploads/image.png') = '/filesystem/212318a0382eb20/image.png'


FILTER

Create a filtered collection according to the filter expression.

Name Type Description Optional
Return Value Indexed Any Filter an indexed collection according to the filter expression No
Parameter 1 collection Indexed Any The collection that must be filtered. No
Parameter 2 filter Boolean The filter expression. No
Parameter 3 itemVariable com.nm.sdk.data.expeval.nodes.VariableNode The name of the variable used for a single item of the list. Yes
Parameter 4 inplace Boolean If set to true, the collection is filtered in place Yes

Example:

FILTER($collection,filter,$item)


FindWorkitem

Extension: Functions

Active Task Workitem

Name Type Description Optional
Return Value Workitem Active Task Workitem No
Parameter 1 workflowInstanceId String Workflow Instance Id No

Example:

FindWorkitem($workflowInstanceId)


FLOOR

Round the given value to the nearest lower integer.

Name Type Description Optional
Return Value Integer round the given value to the nearest lower integer No
Parameter 1 value Number the value to be rounded No

Examples:

FLOOR(1.234)=1
FLOOR(10.99)=10


FOCUS

Set the focus

Name Type Description Optional
Return Value Boolean Set the focus No
Parameter 1 htmlId String HTML Id of the element No

Example:

FOCUS('MyTextField')


FROMLIST

Deprecated

THIS FUNCTION IS DEPRECATED. Use 'ToIndexed' (camel cased) instead.

Name Type Description Optional
Return Value Indexed Any Clear the given data array and fill it with the elemets of the given list No
Parameter 1 dataArray Indexed Any the data array to be filled with the elements of the given list No
Parameter 2 list java.util.Collection the collection containing the elements for the data array No
Aliases "TODATAARRAY", "TOINDEXED"

Example:

FROMLIST($tmp.addresses,[...])


GENERATEPDF

Generate a PDF Document according to the list of Actions and the PdfRenderConfiguration.

Name Type Description Optional
Return Value String return the file location of the PDF No
Parameter 1 actions Indexed Action collection of PdfActions No
Parameter 2 conf PdfRenderConfiguration PdfRenderConfiguration Yes

Example:

GENERATEPDF($actions,$pdfRenderConfiguration);


GETBUSINESSOBJECT

Get a Business Object from the Business Object Repository. If no Version Filter is specified, the current Version Filter will be used.

Name Type Description Optional
Return Value BusinessObject A Business Object Instance or null if the object is not found No
Parameter 1 type String Business Object Type No
Parameter 2 id String Business Object Id No
Parameter 3 versionFilter com.nm.sdk.data.businessobjects.versioning.VersionFilter Version Filter used to select Business Object version Yes

Example:

GETBUSINESSOBJECT('com.nm.sdk.data.documents.Document','T0012')


GETBUSINESSOBJECTS

Get all Business Objects of a specific Type from the Business Object Repository. If no Version Filter is specified, the current Version Filter will be used.

Name Type Description Optional
Return Value Indexed BusinessObject Get the Business Objects of a specific Type No
Parameter 1 type String The name of the Business Object Type that must be fetched No
Parameter 2 versionFilter com.nm.sdk.data.businessobjects.versioning.VersionFilter Version Filter used to select Business Object version Yes

Example:

$objects := GETBUSINESSOBJECTS('Rule', VersionFilter('HeadFilter'))


GetCalendar

Get a Calendar instance.

Name Type Description Optional
Return Value Any Get a Calendar instance. No
Parameter 1 locale String The locale for which the calendar is generated. Yes

Example:

GetCalendar($locale)


GETCOLENTITY

Get a Pointer to the requested collection value.

Name Type Description Optional
Return Value com.nm.sdk.data.expeval.Pointer a Pointer to the requested collection value No
Parameter 1 pointer com.nm.sdk.data.expeval.Pointer the pointer to the object from which we want to get the collection element No
Parameter 2 property java.lang.Object the property's index or key No
Aliases "["

Example:

GETCOLENTITY($entity,2)


GETDEPENDENCIES

Returns the dependencies of the given business object as an indexed collections of com.nm.sdk.data.references.Reference objects.

Name Type Description Optional
Return Value Indexed Any Returns the dependencies of the given business object as an indexed collections of com.nm.sdk.data.references.Reference objects. No
Parameter 1 bo BusinessObject the business object whose dependency must be searched No
Parameter 2 incoming Boolean specifies if incoming (true) or outgoing (false, is the default value) dependencies must be fetched Yes

Example:

$refs := GETDEPENDENCIES($bo)


GETENTITY

Get the data entity with the given id.

Name Type Description Optional
Return Value Any Get the data entity with the given id. No
Parameter 1 entityId String the identifier of the data entity that must be retrieved. No

Example:

GETENTITY('123123123')


GetIconIds

Extension: ComponentExtension

Return an indexed list of all icons currently registered in Appway.

Name Type Description Optional
Return Value Indexed String Returns an indexed collection of all registered icon IDs. No

Example:

$ids := GetIconIds()


GetIconUrl

Extension: ComponentExtension

Return a URL to an icon (either as SVG or PNG, depending on the system configuration) for the given icon id, and the given optional size. If no size is given, 32 is used as the default value. Note that Appway may not have the specific icon size you're requesting. If that's the case, the next higher size is returned. For example, if you request an icon that's 70 pixels wide and high, Appway may return one that is 128 pixels wide and high.

Name Type Description Optional
Return Value String return the URL for the given icon ID No
Parameter 1 string String the id of the icon you want No
Parameter 2 number Number the desired size of the icon in pixels (defaults to 32) Yes

Examples:

GetIconUrl('ext.componentextension.notificationbell')='/resource/(...)/icons/notification_bell/32.png'
GetIconUrl('ext.componentextension.notificationbell',70)='/resource/(...)/icons/notification_bell/128.png'


GetNotificationReceivers

Get the set of receivers (user Ids) for a given list of topics and a delivery channel. The returned set contains exactly the users who would receive a notification with the given topics sent via SendPubSubNotification.

Name Type Description Optional
Return Value Indexed String Get the set of receivers (user Ids) for a given list of topics and a delivery channel. The returned set contains exactly the users who would receive a notification with the given topics sent via SendPubSubNotification. No
Parameter 1 topics Indexed String Indexed collection of topic IDs. Users subscribed to at least one of the topics will be part of the result set. No
Parameter 2 deliveryChannelId String Delivery channel based on whose subscribers the receivers should be computed. If this is not supplied or null, the standard 'appway' delivery channel is used. Yes

Example:

GetNotificationReceivers(['new-american-client']:String, 'appway')


GetNotificationSubscriptions

Get the subscription records matching the given notification subscription filter.

Name Type Description Optional
Return Value Indexed NotificationSubscriptionRecord Get the subscription records matching the given notification subscription filter. No
Parameter 1 filter NotificationSubscriptionFilter Filter defining which subscriptions to retrieve No

Example:

GetNotificationSubscriptions($filter)


GetNotificationTopicDescription

Get the description of a given topic. If the topic does not exist, or has no description, null is returned.

Name Type Description Optional
Return Value String Get the description of a given topic. If the topic does not exist, or has no description, null is returned. No
Parameter 1 topic String The Id of the topic. No

Example:

GetNotificationTopicDescription('myTopic')


GetNotificationTopicIds

Get the Ids of all notification topics in the system.

Name Type Description Optional
Return Value Indexed String Get the Ids of all notification topics in the system. No

Example:

GetNotificationTopicIds()


GetNotificationTopicName

Get the name of a given topic. If the topic does not exist, or has no name, null is returned.

Name Type Description Optional
Return Value String Get the name of a given topic. If the topic does not exist, or has no name, null is returned. No
Parameter 1 topic String The Id of the topic. No

Example:

GetNotificationTopicName('myTopic')


GetNumUnreadNotifications

Get the number of unread notifications for the given user.

Name Type Description Optional
Return Value Integer Get the number of unread notifications for the given user. No
Parameter 1 userId String The Id of the user. No

Example:

GetNumUnreadNotifications(USERID())


GetProcessStatistics

Deprecated

This function is not supported anymore in Appway 6.0 and newer. It always returns an empty named collection.

Name Type Description Optional
Return Value Named ProcessStatistics [no description] No
Parameter 1 processId String Process Id No
Parameter 2 versionUuid String Process Version UUId (BusinessObject.getVersionUuid()) No

Example:

GetProcessStatistics('OrderProcess')


GETPROPERTY

Get a Pointer to the requested property value.

Name Type Description Optional
Return Value com.nm.sdk.data.expeval.Pointer a Pointer to the requested property value No
Parameter 1 entityPointer com.nm.sdk.data.expeval.Pointer the pointer to the value from which we want to get the property No
Parameter 2 property String the property name No
Aliases "."

Example:

GETPROPERTY($entity,'name')


GETSCROLLOFFSETVERTICAL

Get the current vertical scroll offset

Name Type Description Optional
Return Value Integer Get the current vertical scroll offset No

Example:

GETSCROLLOFFSETVERTICAL()


GetSubWorkflowTokenId

Extension: Functions

Returns the sub workflow token id of the requested workflow

Name Type Description Optional
Return Value String Returns the sub workflow token id of the requested workflow No
Parameter 1 workItem Workitem the workitem whose sub-workflow token id must be fetched No
Parameter 2 workflowId String the id of the sub workflow whose token id must be fetched No

Example:

GetSubWorkflowTokenId($workItem, $workflowId)


GetUser

Extension: Functions

Returns the user with the specified id.

Name Type Description Optional
Return Value User Returns the user with the specified id. No
Parameter 1 userId String The userId of the user to be returned No

Example:

GetUser('userId')


GetUsers

Extension: Functions

Returns the collection with all the users.

Name Type Description Optional
Return Value Indexed User Returns the collection with all the users. No

Example:

GetUsers()


GetValuestoreId

Extension: Functions

Get the id of the current valuestore.

Name Type Description Optional
Return Value String Get the id of the current valuestore. No
Parameter 1 workflowInstanceId String the workflow instance id. No

Example:

GetValuestoreId($workflowInstanceId)


GREATER

Return true if each argument is greater than its right-hand sibling.

Name Type Description Optional
Return Value Boolean expr1 > expr2 (> expr3) No
Parameter 1 argument1 Any the first object that should be compared No
Parameter 2 argument2 Any the second object that should be compared No
Parameter 3 argument3 Any the third object that should be compared Yes
Aliases ">"

Examples:

GREATER(2,1)=true
GREATER(1,1)=false
GREATER(1,2)=false
GREATER(2,1,0)=true
GREATER(2,1,1)=false


GREATEREQUAL

Return true if each argument is greater than or equal to its right-hand sibling.

Name Type Description Optional
Return Value Boolean expr1 >= expr2 No
Parameter 1 argument1 Any the first object that should be compared No
Parameter 2 argument2 Any the second object that should be compared No
Parameter 3 argument3 Any the third object that should be compared Yes
Aliases ">="

Examples:

GREATEREQUAL(2,1)=true
GREATEREQUAL(1,1)=true
GREATEREQUAL(1,2)=false
GREATEREQUAL(2,1,0)=true
GREATEREQUAL(2,1,1)=true


HTTPCOOKIEGET

Get the value of an HTTP cookie by name. Returns null if the cookie doesn't exist.

Name Type Description Optional
Return Value String Cookie value No
Parameter 1 name String Cookie name No

Example:

HTTPCOOKIEGET('language') = 'de'


HTTPCOOKIESET

Set a HTTP cookie. Returns true if the cookie has been set. Pass null as value to delete the cookie.

Name Type Description Optional
Return Value Boolean Set an HTTP cookie No
Parameter 1 name String Cookie name No
Parameter 2 value String Cookie value No
Parameter 3 maxAge Integer Max age of the cookie in seconds, -1 (default) for a non-persistent (session) cookie Yes
Parameter 4 domain String Cookie domain (null for no value) Yes
Parameter 5 path String Cookie path Yes
Parameter 6 secure Boolean Cookie secure flag Yes

Example:

HTTPCOOKIESET('language','de',-1)


HTTPGET

Execute a HTTP Get Request to an URL. The function returns the HTTP status code of the response. Important status codes: 200 ok, 304 not modified, 401 unauthorized, 403 forbidden, 404 not found, 500 internal server error. A negative result means an non-HTTP error: -1 unknown I/O error, -2 malformed URL, -3 unknown host, -4 socket timeout, -10 unknown socket error, -11 connection error, -12 no route to host, -13 port unreachable, -14 SSL client authentication failed, -15 Security Issue accessing KeyStores.

Name Type Description Optional
Return Value Integer HTTP status code No
Parameter 1 url String URL No
Parameter 2 file String File path to save the response. A relative path is considered relative to the Data Home. If the path refers to an existing directory, the function uses the HTTP header 'Content-Disposition' (if present) to determine a file name. If no path is specified, the HTTP response body is not saved. Yes
Parameter 3 username String Username Yes
Parameter 4 password String Password Yes
Parameter 5 timeout Integer Timeout in seconds (default is 30 seconds) Yes
Parameter 6 proxyHost String Host name or IP address of proxy server Yes
Parameter 7 proxyPort Integer Proxy server port (default is 8008) Yes
Parameter 8 proxyUsername String Username for proxy server Yes
Parameter 9 proxyPassword String Password for proxy server Yes
Parameter 10 certificateAlias String The keystore alias to be used for SSL authentication Yes

Example:

HTTPGET('http://www.numcom.com',$file)


HTTPPOST

Execute a HTTP Post Request to an URL. The function returns the HTTP status code of the response. A negative result means an non-HTTP error: -1 unknown I/O error, -2 malformed URL, -3 unknown host, -4 socket timeout, -10 unknown socket error, -11 connection error, -12 no route to host, -13 port unreachable, -14 SSL client authentication failed, -15 Security Issue accessing KeyStores. Set the key 'PostBodyText' to a string or the key 'PostBodyFile' to a file path in order to specify the POST request body manually (all other keys will be ignored in this case).

Name Type Description Optional
Return Value Integer HTTP status code No
Parameter 1 url String URL No
Parameter 2 data Named Any POST data as named collection Yes
Parameter 3 file String File path to save the response. A relative path is considered relative to the Data Home. If the path refers to an existing directory, the function uses the HTTP header 'Content-Disposition' (if present) to determine a file name. If no path is specified, the HTTP response body is not saved. Yes
Parameter 4 username String Username Yes
Parameter 5 password String Password Yes
Parameter 6 timeout Integer Timeout in seconds (default is 30 seconds) Yes
Parameter 7 proxyHost String Host name or IP address of proxy server Yes
Parameter 8 proxyPort Integer Proxy server port (default is 8008) Yes
Parameter 9 proxyUsername String Username for proxy server Yes
Parameter 10 proxyPassword String Password for proxy server Yes
Parameter 11 contentCharset String Content Charset (default: ISO-8859-1) Yes
Parameter 12 certificateAlias String The keystore alias to be used for SSL authentication Yes

Example:

HTTPPOST('http://twitter.com/statuses/update.xml', null, $file)


HTTPREQUEST

Get the Http Request object

Name Type Description Optional
Return Value HttpRequest Get the Http Request object No

Example:

HTTPREQUEST()


HTTPRESPONSE

Get the Http Response object

Name Type Description Optional
Return Value HttpResponse Get the Http Response object No

Example:

HTTPRESPONSE()


HTTPSESSION

Get the current user's HTTP session. Returns null if the session doesn't exist.

Name Type Description Optional
Return Value HttpSession HTTP session No
Parameter 1 create Boolean Create session if it doesn't exist (default: true) Yes

Example:

HTTPSESSION()


HTTPSESSIONGET

Get the value of an HTTP session attribute by name. Returns null if the session doesn't exist.

Name Type Description Optional
Return Value Any Attribute value No
Parameter 1 name String Attribute name No

Example:

HTTPSESSIONGET('language') = 'de'


HTTPSESSIONSET

Set an HTTP session attribute. Returns true if the attribute has been set. Pass null as value to remove the attribute.

Name Type Description Optional
Return Value Boolean Set an HTTP session attribute No
Parameter 1 name String Attribute name No
Parameter 2 value Any Attribute value No

Example:

HTTPSESSIONSET('language','de')


HTTPURL

Get the URL of the last HTTP request. All GET and POST parameters will be added to the URL as query parameters.

Name Type Description Optional
Return Value String URL string No

Example:

HTTPURL()


IF

If the first argument ist true, execute and return the second argument. If the first argument is false, execute and return the third argument.

Name Type Description Optional
Return Value Any execute and return the second argument if booleanArgument evaluates to true. Otherwise, execute and return the third argument No
Parameter 1 booleanArgument Boolean the boolean argument No
Parameter 2 caseTrue Any executed if boolean argument is true No
Parameter 3 caseFalse Any executed if boolean argument is false Yes

Examples:

IF(true,'hello','world')='hello'
IF(false,'hello','world')='world'


ImageInfo

Extension: Functions

Get information about an image: width, height, format etc.

Name Type Description Optional
Return Value ImageInfo ImageInfo object No
Parameter 1 file String Image file path or resource id No
Parameter 2 versionFilter com.nm.sdk.data.businessobjects.versioning.VersionFilter Version filter Yes

Example:

ImageInfo($file)


INCOMINGDEPENDENCIES

Returns an indexed collection of dependency sources (type 'Any') which depend on the Object of the given type and id. Dependencies from non-head objects or deleted objects will not be returned.

Name Type Description Optional
Return Value Indexed Any Returns an indexed collection of dependency sources (type 'Any') which depend on the Object of the given type and id No
Parameter 1 type String The Business Object's type No
Parameter 2 id String The Business Object's id No

Example:

INCOMINGDEPENDENCIES('Screen','Portal')


INDEXOF

Get the index of an element in an indexed collection. If the elements is not contained in the collection, -1 is returned.

Name Type Description Optional
Return Value Integer Get the index of an element in an indexed collection No
Parameter 1 element Any element No
Parameter 2 collection Indexed Any collection No

Example:

INDEXOF($element,$collection)


INPREVIEW

Return true if expression is evaluated in Screen preview mode, false otherwise

Name Type Description Optional
Return Value Boolean Return true if expression is evaluated in Screen preview mode, false otherwise No

Examples:

INPREVIEW()
IF(INPREVIEW(),'You are using the preview mode','You are not using the preview mode')


INTERSECTION

Return the intersection of two indexed collections, i.e. all elements that occur in both collection. INSERSECTION($c1,$c2) == $c1 ∩ $c2

Name Type Description Optional
Return Value Indexed Any Intersection of two indexed collections No
Parameter 1 collection Indexed Any collection No
Parameter 2 collection Indexed Any collection No

Examples:

INTERSECTION($collection1,$collection2)
INTERSECTION(['a','b'],['b','c']) = ['b']


ISA

Return true if argument 1 is an instance of the class given in argument 2.

Name Type Description Optional
Return Value Boolean True if param1 is an instance of the class given in param2 No
Parameter 1 instance Any The instance whose type must be checked. No
Parameter 2 type String The type that must be checked. No
Aliases "isa"

Example:

ISA($b,Person)


IsAjaxUpdateRequest

This function checks whether the current HTTP request is an Ajax Update request. If it is called with an HTML id pattern as argument, it also checks whether an area with a matching HTML id is updated.

Name Type Description Optional
Return Value Boolean true if the current HTTP request is an Ajax Update request (for the area with a matching HTML id), false otherwise No
Parameter 1 htmlIdPattern String Regular expression pattern for an HTML id of an Ajax Update area Yes

Examples:

IsAjaxUpdateRequest() = true
IsAjaxUpdateRequest('PersonTable') = false


IsDataEntity

check if the given path points to a dataentity of the given type

Name Type Description Optional
Return Value java.lang.Boolean check if the given path points to a dataentity of the given type No
Parameter 1 dataPath Any the location to be checked. No
Parameter 2 type String the expected type No
Parameter 3 throw Boolean if true throw an exception Yes

Example:

IsDataEntity($a.b,'Any')


IsDefined

Return true if a variable with the given name is defined.

Name Type Description Optional
Return Value Boolean True if a variable with the given name is defined. No
Parameter 1 variableName String The name of the variable to be checked, not the variable itself! No

Example:

IsDefined('variable')


ISRECENTLYUSED

Returns whether the given object was recently used by the given user.

Name Type Description Optional
Return Value Boolean Whether the given object was recently used by the given user No
Parameter 1 type String The Business Object's type No
Parameter 2 id String The Business Object's id No
Parameter 3 userId String The User's id No

Example:

ISRECENTLYUSED('Screen','Portal','john')


JaasLoginTest

Extension: Functions

Test whether the given user is accepted by a JAAS application.

Name Type Description Optional
Return Value Boolean [no description] No
Parameter 1 appName String JAAS application name No
Parameter 2 userId String User id No
Parameter 3 password String Password No

Example:

JaasLoginTest('appway', $userid, $password)


JAVAEXEC

Execute Java code using BeanShell. There are two implicit variables defined in the Java code: 'arguments' is an Object[] with additional arguments passed to the JAVAEXEC function and 'context' is an ExecutionContext instance.

Name Type Description Optional
Return Value String Output of print(..) calls No
Parameter 1 code String Java code to execute No
Parameter 2 argument Any Arguments Yes

Example:

JAVAEXEC('Thread.sleep(1000);')


JOIN

Join all arguments into one text, appending them to each other.

Name Type Description Optional
Return Value String join all string arguments No
Parameter 1 string String a string No
Parameter 2 string String a string Yes
Aliases "&"

Examples:

JOIN('hello',' ','world')='hello world'
JOIN('John','; ','Jill','; ','James')='John; Jill; James'


JOINLIST

Join an list of strings into a single string. Use the reverse function SPLIT to split a string into a list of strings.

Name Type Description Optional
Return Value String Join a list of strings. No
Parameter 1 list Indexed String List with string elements No
Parameter 2 string String Separator string Yes

Examples:

JOINLIST($texts, '|')='hello|world'
JOINLIST(['James','John','Jim'], ';')='James;John;Jim'


JOINPATH

Join all path elements into one path, appending them to each other using / as separator.

Name Type Description Optional
Return Value String join a path No
Parameter 1 string String a path No
Parameter 2 string String a path Yes

Examples:

JOINPATH('content','files')='content/files'
JOIN('/nm/data','backups\2007/','/10')='/nm/data/backups/2007/10'


KEY

Find the key of a given element in a named collection

Name Type Description Optional
Return Value String Get the key of an element in a named collection No
Parameter 1 element Any element No
Parameter 2 collection Named Any collection No

Example:

KEY($element,$collection)


KEYS

Get all keys in a named collection

Name Type Description Optional
Return Value Indexed String Return all keys in a named collection No
Parameter 1 collection Named Any named collection No

Examples:

KEYS($collection)
KEYS(['name':'John';'street':'Hollywood Boulevard']) = ['name','street']


LANGUAGE

Returns the current translation language.

Name Type Description Optional
Return Value String Translation language No

Example:

LANGUAGE() = 'fr'


LeftPad

make sure the given string has at least the given length

Name Type Description Optional
Return Value String make sure the given string has at least the given length No
Parameter 1 text String the text to be padded No
Parameter 2 length Integer the minimal length No
Parameter 3 paddingChar String the character that is used for padding (default is ' '. Yes

Examples:

LeftPad('bar',5)='  bar'
LeftPad('barfoo',5)='barfoo'


LENGTH

Calculate the length of the given string argument.

Name Type Description Optional
Return Value Integer Return the length of the given string argument No
Parameter 1 string String the string whose length we want No

Example:

LENGTH('hello')=5


LESS

Return true if each argument is less than its right-hand sibling.

Name Type Description Optional
Return Value Boolean expr1 < expr2 (< expr3) No
Parameter 1 argument Any the first object that should be compared No
Parameter 2 argument Any the second object that should be compared No
Parameter 3 argument Any the third object that should be compared Yes
Aliases "<"

Examples:

LESS(1,2,3)=true
LESS(1,2,2)=false
LESS(2,2,2)=false
LESS(2,2,1)=false


LESSEQUAL

Return true if each argument is less than or equal to its right-hand sibling.

Name Type Description Optional
Return Value Boolean expr1 <= expr2 (<= expr3) No
Parameter 1 argument Any the first object that should be compared No
Parameter 2 argument Any the second object that should be compared No
Parameter 3 argument Any the third object that should be compared Yes
Aliases "<="

Examples:

LESSEQUAL(1,2,3)=true
LESSEQUAL(1,2,2)=true
LESSEQUAL(2,2,2)=true
LESSEQUAL(2,2,1)=false


LIST

Search the given catalog for the given value in the column 'searchColumn' and return the value from column 'selectColumn'.

Name Type Description Optional
Return Value String Search the given catalog for the given value in the column 'searchColumn' and return the value from column 'selectColumn' No
Parameter 1 searchValue String the value we are looking for in the list No
Parameter 2 catalogName String the name of the catalog in which we are searching No
Parameter 3 selectColumn String the column whose value should be returned, default is 'id' Yes
Parameter 4 searchColumn String the column in which we search the value, default is 'id' Yes
Parameter 5 variableAssignments Named Any possible variable assignments Yes

Example:

LIST(searchValue, catalogName, selectColumn, searchColumn)


ListClusterFiles

Lists all cluster file IDs (paths), optionally filtered with a given regular expression.

Name Type Description Optional
Return Value Indexed ClusterFile An indexed collection of cluster files. No
Parameter 1 filterExpression String A regular expression that is used to filter the cluster file paths. Yes

Example:

ListClusterFiles(null)


LISTCONTENT

Get an indexed collection of file and directory names contained in a directory. Names are ordered case insensitive. If the directory doesn't exists, null is returned. Relative paths are interpreted relative to the Data Home.

Name Type Description Optional
Return Value Indexed String Returns an indexed collection of file and directory names No
Parameter 1 path String The directory to list the content from No

Example:

LISTCONTENT('uploads/2006')


LISTDIRECTORIES

Get an indexed collection of directory names contained in a directory. Directories are ordered by name (case insensitive). If the directory doesn't exists, null is returned. Relative paths are interpreted relative to the Data Home.

Name Type Description Optional
Return Value Indexed String Returns an indexed collection of directory names No
Parameter 1 path String The directory to list the subdirectories from No

Example:

LISTDIRECTORIES('uploads/2006')


LISTFILES

Get an indexed collection of file names contained in a directory. Files are ordered by name (case insensitive). If the directory doesn't exists, null is returned. Relative paths are interpreted relative to the Data Home.

Name Type Description Optional
Return Value Indexed String Returns an indexed collection of file names No
Parameter 1 path String The directory to list the files from No

Example:

LISTFILES('uploads/2006')


LN

Return the natural logarithm (base e) of the argument value.

Name Type Description Optional
Return Value Double Returns the natural logarithm (base e) of the argument value No
Parameter 1 value Double the value No

Example:

LN(EXP(2))=2.0


LoadData

Load the entity with the given id

Name Type Description Optional
Return Value Any Load the entity with the given id No
Parameter 1 id String the id of the requested entity No

Example:

LoadData($id)


LOADFROMCSV

Get a collection of entities generated from the given csv file.

Name Type Description Optional
Return Value Indexed Any Get a collection of entities generated from the given csv file. No
Parameter 1 dataclass String the name of the dataclass No
Parameter 2 file String the name of the csv file No
Parameter 3 separator String the field separator character. Default: ';' Yes
Parameter 4 escape String the escape character. Default: '"' Yes
Parameter 5 quote String the quote character. Default: the same as the escape character. Yes
Parameter 6 encoding String the file encoding. Default: the system default encoding. Yes
Parameter 7 skipLines Integer numbers of lines to skip from the beginning of the file. Default: 0 Yes

Example:

$anyIndexed:=LOADFROMCSV('DataClass','file')


LoadNotifications

Load the newest notifications of the given user (read and unread).

Name Type Description Optional
Return Value Indexed Notification Load the newest notifications of the given user (read and unread). No
Parameter 1 userId String The Id of the user whose notifications to load No
Parameter 2 n Integer The maximal number of notifications to return. If this is -1, all notifications are returned. No
Parameter 3 unreadOnly Boolean If this is set to true, only unread notifications are returned. Default is false. Yes
Parameter 4 inbox String The type of notification inbox to load for the given user. If this is not supplied or null, the default inbox is used. Other inboxes are defined by the function configured in nm.usermessaging.notification.inbox.function Yes

Example:

LoadNotifications(USERID(), 10)


LOADTESTDATA

Load a test data set. The loader searches for variables in the current scope hierarchy and assigns the values of corresponding variables in the testset if available.

Name Type Description Optional
Return Value Nothing Load a test data set. No
Parameter 1 testDataId String the id of the Test Data No
Parameter 2 deprecated Boolean Deprecated, do not use this parameter anymore. Yes

Example:

LOADTESTDATA('id of test data')


LocationPath

Extension: Functions

the LocationElement path for the given workitem id

Name Type Description Optional
Return Value Indexed LocationPathElement the LocationElement path for the given workitem id No
Parameter 1 workitemId String the id workitem.tokenId No
Parameter 2 type String the type of the id: 'Process' (default), 'Screen' Yes

Example:

LocationPath($workitemId)


LocationStack

Get the current Location Stack

Name Type Description Optional
Return Value Indexed Any Location Stack No

Example:

LocationStack()


LockWorkflowInstance

Extension: Functions

Deprecated

This function is not supported anymore in Appway 6.0. It is no longer possible to create explicit locks on Process Instances.

Name Type Description Optional
Return Value Nothing No
Parameter 1 workflowInstanceId String Workflow Instance Id No

Example:

LockWorkflowInstance($workflowInstanceId)


LOG

Return the first argument value's logarithm using the second argument value as the base.

Name Type Description Optional
Return Value Double Returns the first argument value's logarithm to the second argument value No
Parameter 1 value Double the value No
Parameter 2 base Integer the base value Yes

Example:

LOG(100,10)=2


LOGGER

Write a message to a logger with a given priority.

Name Type Description Optional
Return Value Nothing Write the given message with the given priority to a logger. No
Parameter 1 priority String the message's priority: 'fatal','error','warn','info' or 'debug'. No
Parameter 2 message Any the message. No
Parameter 3 logger String logger name, default is 'com.nm.functions.LOGGER' Yes

Example:

LOGGER('info','hello')


LOGIN

Login a user given its username and password. This function must be called in a context where an HTTP request is available. The function returns true if login was successful. The function returns false if there is no HTTP request available or if the username or the password is not correct.

Name Type Description Optional
Return Value Boolean true if login was successful, false otherwise No
Parameter 1 username String User name No
Parameter 2 password String Password No

Example:

LOGIN($username, $password)


LOGOUT

Logout the current user by invalidating its HTTP session. Returns true if logout has been successful.

Name Type Description Optional
Return Value Boolean [no description] No

Example:

LOGOUT()


LONG

Return the long date format of the given date and locale.

Name Type Description Optional
Return Value String Returns the long date format of the given date and locale. No
Parameter 1 date Date the date we want to format No
Parameter 2 locale String the language code Yes
Parameter 3 timeZone String the time zone Yes

Example:

LONG(NOW())=....


LOWERCASE

Convert all of the characters in the String to lower case.

Name Type Description Optional
Return Value String Converts all of the characters in the String to lower case. No
Parameter 1 string String the string No

Examples:

LOWERCASE('HELLO')='hello'
LOWERCASE('John Woo')='john woo'


MakeUppercaseTexts

Convert all texts in the given data entity to uppercase.

Name Type Description Optional
Return Value Nothing No
Parameter 1 entity Any the entity whose texts must be converted No

Example:

MakeUppercaseTexts($person)


MAP

Apply a transformation expression to every item in an indexed collection, and return a new list containing the newly created items.

Name Type Description Optional
Return Value Indexed Any Transformed indexed collection No
Parameter 1 collection Indexed Any Indexed collection to be transformed No
Parameter 2 transformation Any Transformation expression No
Parameter 3 variable com.nm.sdk.data.expeval.nodes.VariableNode Transformation variable, default is $item Yes
Parameter 4 type String Data Type of the elements in the transformed collection, default is 'Any' Yes

Examples:

MAP($persons, $person.FullName(), $person, 'String')
MAP(['peter','john','sam'], LENGTH($item), $item, 'Integer') = [5, 4, 3]


Markdown

Render text written using the Markdown language to HTML.

Name Type Description Optional
Return Value String Rendered HTML for given Markdown text No
Parameter 1 string String a string written in Markdown No

Example:

Markdown('This is *important*!')='This is <em>important</em>!'


MarkNotificationRead

Mark the notification with the given Id read for the given user.

Name Type Description Optional
Return Value Nothing No
Parameter 1 userId String The Id of the user who has read the notification No
Parameter 2 notificationId String The message Id of the notification that was read No
Parameter 3 inbox String The type of notification inbox to remove the given notification from. If this is not supplied or null, the default inbox is used. Other inboxes are defined by the function configured in nm.usermessaging.notification.inbox.function Yes

Example:

MarkNotificationRead(USERID(), 'some/notification/message/id')


MATCH

Check if a text matches a pattern.

Name Type Description Optional
Return Value Boolean Check if the given text matches the given pattern No
Parameter 1 text String the text we want match with the pattern No
Parameter 2 pattern String the pattern we want to check No

Examples:

MATCH('aabbaabb','ab')=true
MATCH('000-1234','[0-9]{3}-[0-9]{4}')=true
MATCH('abc-1234','[0-9]{3}-[0-9]{4}')=false
MATCH('1234-1234','[0-9]{3}-[0-9]{4}')=false


MATCHCOUNT

Count the number of times a text matches a pattern.

Name Type Description Optional
Return Value Integer count the number of matches of the second argument in the first argument No
Parameter 1 text String the text in which we want to find the pattern No
Parameter 2 pattern String the pattern we want to count No

Examples:

MATCHCOUNT('aabbaabb','ab')=2
MATCHCOUNT('John,James,Jim,Jack','Ja') = 2
MATCHCOUNT('The 23. chapter','[0-9]') = 2


MatchingStrings

Extension: Functions

An Indexed List of all Strings matching a given Regular Expression.

Name Type Description Optional
Return Value Indexed String An Indexed List of all Strings matching a given Regular Expression. No
Parameter 1 text String the text you want to search for the regex. No
Parameter 2 regex String the regular expression used to seach through the string (multiline) No

Example:

SPLIT('I just ate a donut, it was good!','\W[a-z]{3}\W') = [' ate ',' was ']


MAX

Find the highest number in a given list of numbers.

Name Type Description Optional
Return Value Number Find the maximum of the given number list No
Parameter 1 number Number a number No
Parameter 2 number Number a number Yes

Examples:

MAX(1,2,3)=3
MAX(-1,1)=1
MAX(1.1,1)=1.1


MEDIUM

Return the medium date format of the given date and locale.

Name Type Description Optional
Return Value String Returns the medium date format of the given date and locale. No
Parameter 1 date Date the date that must be formated No
Parameter 2 locale String the language code Yes
Parameter 3 timeZone String the time zone Yes

Example:

MEDIUM(TODAY(),'de') = '01.04.2005'


MergePDFFiles

[no description]

Name Type Description Optional
Return Value Nothing No
Parameter 1 inputFiles Indexed String Indexed collection with input file paths No
Parameter 2 outputFile String Output file path No
Parameter 3 optimized Boolean Whether to optimize or not the generated outputFile. Optimization needs more memory. Default: true Yes

Example:

MergePDFFiles($inputFiles, $outputFile)


METHODCALL

Build a function pointer and associate it with the given arguments.

Name Type Description Optional
Return Value java.lang.Object build a function pointer and associate it with the given arguments No
Parameter 1 pointer com.nm.sdk.data.expeval.Pointer the object whose method must be called No
Parameter 2 methodName String the name of the method that must be called No
Parameter 3 expression com.nm.sdk.data.expeval.Pointer the expression for the argument Yes
Aliases "("

Example:

METHODCALL(pointer,methodName,arg1,arg2,...,argN)


MIN

Find the smallest number in a given list of numbers.

Name Type Description Optional
Return Value Number Find the minimum of the given number list No
Parameter 1 number Number a number No
Parameter 2 number Number a number Yes

Examples:

MIN(1,2,3)=1
MIN(-1,1)=-1
MIN(1,1.1)=1


MOD

Calculate the Integer rest of the Integer division.

Name Type Description Optional
Return Value Number the integer rest of the integer division No
Parameter 1 dividend Number the number that will be divided No
Parameter 2 divisor Integer the number that divides the dividend No
Aliases "%", "mod"

Examples:

MOD(13,2)=1
MOD(8.5,4)=0


MOVEDIRECTORY

Move a directory to a new location. If the target directory already exists, this function will merge the source directory into the target directory. If the parent directory of the target directory doesn't exist, it will be created. Relative paths are interpreted relative to the Data Home.

Name Type Description Optional
Return Value Boolean Returns true if the operation was successful No
Parameter 1 sourcePath String The directory to move No
Parameter 2 targetPath String The target location No

Example:

MOVEDIRECTORY('uploads/2006','uploads/archive/2006')