Functions

From PresenceWiki
Revision as of 15:38, 4 February 2011 by Mattpryor (Talk | contribs)

Jump to: navigation, search

Index of Functions

This list aims to be a comprehensive list of default functions available with Presence 3.6.2. Please note that it is a work in progress.

Boolean Functions

  • &equalsString {String1, String2}

This function compares String1 and String2. If they are equal it will return the value "true". Otherwise it will return "false".

  • &if {testString, resultForTrue, resultForFalse}

This function performs a test on "testString". If it equals "true" or "1" the value of "resultForTrue" will be returned. Otherwise, "resultForFalse" will be returned.

Data Functions

  • onDemand {taskAlias, parameter+}

Calls an On Demand Task.

taskAlias: The alias of the Task to be called parameter+ : The Parameters to be passed (zero or more).

eg:

&onDemand{"myTask","id=5", "now=true"}

Calls the Task referenced by the alias "myTask" and sets the following variables:

${id} = 5 ${now} = true

Date Functions

  • &currentDate {format, offset}

format: The date format to use to format the current date (e.g. "dd/MM/yyyy"). offset: (Optional) The offset in days (e.g. -1, 1, 2, -5)

Returns: the current date in the format specified by the first parameter.