Skip to main content
Skip table of contents

Placeholders

Fields

Placeholder

Description

{{fields["field_id_here"]}}

Gets the value of a field given its id.

Metadata

Placeholder

Description

{{metadata["metadata_id_here"]}}

Gets the value of a metadata item given its id.

This is commonly used in action stages where metadata values might be getting updated by prior stages.

Current User

Placeholder

Description

{{user["email"]}}

Email address of the currently logged in user.

{{user["username"]}}

User name of the currently logged in user.

{{user["displayName"]}}

Display name of the currently logged in user.

{{user["id"]}}

Id of the currently logged in user.

{{user["udv.department"]}}

Gets the value of the “department” user defined value that has been configured in Users | User-Defined-Values

{{user["manager.id"]}}

User name of the manager for the currently logged in user.

{{user["manager.email"]}}

Email address of the manager for the currently logged in user.

{{user["manager.displayName"]}}

Display name of the manager for the currently logged in user.

{{user["manager.udv.department"]}}

Gets the value of the managers “department” user defined value that has been configured for the current user.

Item

The following item placeholders are usable in fields of Remote Indexing Assistant items.

Placeholder

Description

{{item["id"]}}

GUID of the indexing item

{{item["name"]}}

Name of the indexing item

{{item["size"]}}

Size of the indexing item

{{item["queueId"]}}

GUID of the queue that the indexing item is located in

{{item["queueName"]}}

Name of the queue that the indexing item is located in

{{item["queueTypeId"]}}

GUID of the queue type that the indexing item is located in

{{item["queueTypeName"]}}

Name of the queue type that the indexing item is located in

Date/Time

Placeholder

Description

Output

{{date}}

Outputs the current server date in format yyyyMMdd

You can change the format using the format method:

{{date | format("{0:yyyyMM}")}}

20231225

{{time}}

Outputs the current server time in format hhmmss

You can change the format using the format method:

{{time | format("{0:hh-mm-ss}")}}

055322

Methods

Name

Usage Syntax

Input

Result

Format

format("%{0}%")

Cat

%Cat%

Split

split("|",2)

Cat|Dog

Dog

Join

join(" || ")

Use this method to join values from a collection such as check boxes or multi-select.

Value 1
Value 2

Value 1 || Value 2

ToLower

toLower()

Cat

cat

ToUpper

toUpper()

Cat

CAT

ToTitle

toTitle()

the MOUSE likes cheese

The Mouse Likes Cheese

ToSentence

toSentence()

the MOUSE likes cheese. yum yum!

The MOUSE likes cheese. Yum yum!

TrimWhiteSpace

trim()

       Cat      

Cat

Replace

replace(" ","")

This is some text

Thisissometext

AsFinanaicalYear

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

01/04/2018

2017-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/2018

2017-2018

Exists

exists()

Value

true

Starts With

startsWith("Fri")

Friday

true

Ends With

endsWith("ay")

Saturday

true

Contains

contains("ver")

Conversion

true

Matches (regex)

matches("[0-9]2")

abc123IAM

true

Date field output conversion

Convert the date output format to YYYYMMDD

CODE
{{fields["invoice_date"] | asDate("dd/MM/yyyy") | format("{0:yyyyMMdd}")}}

12/02/2021

20210221

Equals

equals("Hi")

Hi

true

GreaterThan

greaterThan(5)

5.10

true

LessThan

lessThan(10)

10

false

GreaterThanEquals

greaterThanEquals(5)

5

true

LessThanEquals

lessThanEquals(10)

10

true

Coalesce

CODE
{{coalesce(fields["field1"], fields["field2"], fields["field3"])}}

Returns the value for the first object that has a value.

Field 1: ““
Field 2: “My Value”
Field 3: “Another Value”

My Value

AsVariableDate

CODE
{{fields["invoice_date"]|asVariableDate()|format("{0:dd/MM/yyyy}")}}

Attempts to parse the date format as the current machine locale.

Then outputs as the date format dd/MM/yyyy

25 Jan 2023

25/01/2023

Sum

CODE
{{sum(fields["number1"],fields["number2""])}}

number1: 5
number2: 10

15

{{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".

{{fields["field_id_here"]|equals(fields["other_field"])}}

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

This then gets the value of the field with id “other_field”.

Then it compares the values and returns a boolean of the result.

Grids

We gave the following placeholders that are available for accessing data in grid fields.

Method

Example

Description

Cell

{{fields["grid"] | cell(rowNumber, "columnFieldId")}}

{{fields["grid"] | cell(1, "supplierName")}}

Gets the value of a specific cell in the grid.

The “rowNumber” should be an integer and starts at 1 for the first row.

Count

{{fields["grid"] | count()}}

Gets a count of the number of rows in the grid.

Join

{{fields["grid"] | join("separator", "columnFieldId")}}

{{fields["grid"] | join("|", "columnFieldId")}}

Gets the values from a certain column in the grid and joins them together using the specified separator.

Note: There is a limitation where a comma can’t be used at the separator.

Example output:

row1|row2|row3

Sum

{{fields["grid"] | sum("columnFieldId")}}

Gets the sum of all values in the specified column.

If the values that are getting summed are not numbers then it will return no results.

Grid As Text

{{fields["grid"] | gridAsText("separator", includeHeaders)}}

separator is the character to use to join the values

includeHeaders is a Boolean value to include the headers in the output

{{fields["grid"] | gridAsText(" | ", true)}}

Gets the values from each row in the grid and joins them together using the specified separator.

Note: There is a limitation where a comma can’t be used at the separator.

Example output:

col_1 | col_2 | col_3 | col_4
value1 | value2 | value3 | value4

Grid As Csv

{{fields["grid"] | gridAsCsv(includeHeaders)}}

includeHeaders is a Boolean value to include the headers in the output

{{fields["grid"] | gridAsCsv(true)}}

Gets the values from each row in the grid and joins them together using a comma.

Example output:

col_1,col_2,col_3,col_4
value1,value2,value3,value4

Grid As Html

{{fields["grid"] | gridAsHtml(includeHeaders)}}

includeHeaders is a Boolean value to include the headers in the output

{{fields["grid"] | gridAsHtml(true)}}

Gets the values from each row in the grid and outputs it as a HTML formatted table. Perfect for use in emails or PDF’s.

Example output:

CODE
<table><tbody><tr><th>col_1</th><th>col_2</th><th>col_3</th></tr><tr><td>value1</td><td>value2</td><td>value3</td></tr></tbody></table>

Can then use CSS to style your table:

CODE
<style>
  table, th, td {
    border:1px solid;
    padding: 12px 15px;
    border-collapse: collapse;
  }
</style>

This will then produce:

image-20240206-115508.png

Grid As Vertical Html

{{fields["grid"] | gridAsVerticalHtml()}}

Gets the values from each row in the grid and outputs it as a HTML formatted table. Perfect for use in emails or PDF’s.

Example output:

CODE
<table><tbody><tr><th colspan="2">Entry #1</th></tr><tr><th>col_1:</th><td>Value 1</td></tr><tr><th>col_2:</th><td>Value 2</td></tr><tr><th>col_3:</th><td>Value 3</td></tr><tr><th colspan="2">Entry #2</th></tr><tr><th>col_1:</th><td>Value 1</td></tr><tr><th>col_2:</th><td>Value 2</td></tr><tr><th>col_3:</th><td>Value 3</td></tr></tbody></table>

Can then use CSS to style your table:

CODE
<style>
  table, th, td {
    border:1px solid;
    padding: 12px 15px;
    border-collapse: collapse;
  }
</style>

This will then produce:

image-20240314-053556.png

Complex Methods

Placeholder Example 1
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 ("")

Placeholder Example 2
CODE
{{fields["gst_amount"] | greaterThan(0) | condition(format("${0}", fields["gst_amount"]), "No GST")}}

The above placeholder will return the gst_amount (with a prepended dollar sign) when it is greater than 0.

Otherwise it will return the string “No GST”.

JavaScript errors detected

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

If this problem persists, please contact our support.