Functions
Last updated
Last updated
FlowScript has a number of built-in functions to transform or query the variables in your workflow. FlowScript uses a function call syntax identical to that of common programming languages such as C, Java and Visual Basic, where the function name is followed by an opening parenthesis, a commaseparated list of inputs (if required by the function) and a closing parenthesis:
Functions that require no parameters (such as the Now function, which returns today's date and time) must still be written with opening and closing parentheses, i.e. {now()}
.
Functions in Flow never have side effects; that is, they never modify their input.
Screen shot: A User Task configuration dialog showing the user of the Upper function, which transforms the value of the variable "firstName" into uppercase. Note that the content of the firstName variable is not affected by this; all FlowScript functions return new values, leaving the input value(s) untouched.
Screen shot: The same User Task running in the web client. Note that the name "Richard" has been transformed to all-uppercase by the Upper function.
Another example is the Left function that returns the first N characters of the input text, where N is the value of the second parameter. If firstName has value "Richard" and lastName "Feynman" the result of this example would be "Your initials: R F".