Skip to main content
Skip table of contents

Placeholders

Fields

{{fields["field_id_here"]}}

Current User

{{user["email"]}}

{{user["username"]}}

Date/Time

{{date}}

{{time}}

Methods

NameUsage SyntaxInputResult
Formatformat("%{0}%")Cat%Cat%
Splitsplit("|",2)Cat|DogDog
ToLowertoLower()Catcat
ToUppertoUpper()CatCAT
TrimWhiteSpacetrim()       Cat      Cat
AsFinanaicalYearasFinancialYear("dd/MM") - Where dd/MM is the day/month that the financial year starts on. eg Australia would be 01/0701/04/20182017-2018
AsFinanaicalYear

asFinancialYear("dd/MM", "dd/MM/yyyy")

Where dd/MM is the day/month that the financial year starts on. eg Australia would be 01/07

Where dd/MM/yyyy is the date formatting of the input date (defaults to the culture of the IIS server). eg Australia would be "dd/MM/yyyy". USA would be "MM/dd/yyyy"

01/04/20182017-2018
Existsexists()Valuetrue
Starts WithstartsWith("Fri")Fridaytrue
Ends WithendsWith("ay")Saturdaytrue
Containscontains("ver")Conversiontrue
Matches (regex)matches("[0-9]2")abc123IAMtrue
Date field output conversion

Convert the date output format to YYYYMMDD

{{fields["date_field"] | asDate() | format("{0:yyyyMMdd}")}}
12/02/202120210221

{fields["field_id_here"]|method1|method2}}

Note: Methods can be chained together and are run sequentially.

Example usage syntax:

{{fields["field_id_here"]|split(",",2)}}

This would get the value of the field with id "field_id_here", split on the comma and then return the 2nd value.

{{fields["field_id_here"]|split("|",2)|trim()}}

This would get the value of the field with id "field_id_here", split on the pipe and then return the 2nd value.

Then it would trim all leading and trailing white space.

{{fields["financial_date_id"]|asFinancialYear("01/07")}}

This would get the value of the field with id ""field_id_here", and convert it to a human readable financial year.

{{fields["field_id_here"]|exists()|condition("yes", "no")}}

This would get the value of the field with id "field_id_here".

Then if it has a value it would return the text "yes" otherwise it would return "no".

{{fields["field_id_here"]|contains("ver")|condition("TrueValue", "FalseValue")}}

This would get the value of the field with id "field_id_here".

Then if it's value contains "ver" it returns "TrueValue" otherwise it would return "FalseValue".

Complex Methods

Placeholder Example

C#
{{fields["workflow"] | exists() | condition(format("{0} || uA1 || new workflow", fields["workflow"]), "")}}


Reading left to right;

  • Start with fields["workflow"] as our input
  • | delimits operations in the filter chain, and is very similar to bash shells and how they pipe outputs
    • When a pipe exists, everything on the left side is evaluated, and passed into the right side as input
    • They respect parentheses, and will be ignored if nested in quotes
  • exists() will see whether the input value (fields["workflow"]) is empty, null, or whitespace, and return true/false
  • condition(trueOutput, falseOutput) will take a boolean input, and return either its trueOutput or falseOutput
    • Think of it as an if statement
    • When true the first argument is evaluated,​​​​​​​
      • format(text, values[]) leverages the standard .net string format, and can use placeholders matched to the input indices, starting from 0
    • When false then the second argument is evaluated, which is an empty string ("")
JavaScript errors detected

Please note, these errors can depend on your browser setup.

If this problem persists, please contact our support.