Skip to main content
Skip table of contents

Placeholders in JSON

Placeholders are used to define the value of specific data field in a JSON for jobs or templates. There’s no early verification if this is resolvable, so errors may only be detected when job is being processed.

Syntax

  • There us a general syntax to refer to to placeholders: ${placeholder}

  • Distinguishing between field and optional format by pipe character, e.g. ${StartTime|a}

  • A field can be defined as combination of placeholder with fix text (e.g. "title": "Created_${StartTime|dd.MM.yy HH:mm:ss}")

  • To concatenate placeholders combine them in a field (e.g. "title": "Created_${StartTime|ddd}${StartTime|dd.MM.YYYY HH:mm:ss.fff}")

  • Placeholders are evaluated case-insensitively (except generic ones, which are evaluated in another way)

Variables

Variables can be referred to by the special placeholder ${var:...}. The actual value of the variable can be defined by a specific API (see api/variables). For usage of variables see Using Variables to Make Jobs More Flexible.

Source Fields

These fields support usage of placeholders.

Field name

Description

Formats

Supported by

StartTime

Time of creation of the target entry

All DateTime formats as described below

DPE Writer Filter

WAVDest Filter

Database Groups

ProcessingHost

Alias name of the host, which processes the job.

By default this is the Windows machine name of the host.

none

Service side evaluation for every field inside JobDescription

Var

Generic variable, which is defined for the ROAD cluster

For description see api/variables

${Var:MyVar} to refer to the variable "MyVar"

Note the variable name is evaluated case-sensitively

All fields in a job description

Formats

DateTime Formats

The described format identifiers can be separated by any of these special characters: . (dot) , (comma) ; (semicolon) : (colon) / (slash) - (dash) ()[] (round and square brackets) (space)

If no format is specified (meaning no pipe symbol is included in the field) a default is applied: yyyy-MM-dd HH:mm:ss

Year

yy

2 digits

yyyy

4 digits

Month

M

numeric 1 digit (2 if required)

MM

numeric 2 digits

MMM

alphabetic abbreviated (using system language)

MMMM

alphabetic full (using system language)

Day of month

d

numeric 1 digit (2 if required)

dd

numeric 2 digits

Weekday

ddd

alphabetic abbreviated (using system language)

dddd

alphabetic full (using system language)

Hour (24h format)

H

numeric 1 digit (2 if required)

HH

numeric 2 digits

Minute

m

numeric 1 digit (2 if required)

mm

numeric 2 digits

Second

s

numeric 1 digit (2 if required)

ss

numeric 2 digits

Second's fractional part

f
ff
fff

any amount of digits

(from 1 to 3 digits corresponding to tenth to thousandth of a second)

(These format specifiers are guided by .net standards: https://docs.microsoft.com/en-us/dotnet/standard/base-types/custom-date-and-time-format-strings. Extensions may come later, but for now we decided to support only these ones.)

In addition, if you append "|L" to the format string, the time is converted into the local time zone before formatting. (Without "|L", UTC time is formatted.)

Examples

  • ${StartTime|dd.MM.yy HH:mm:ss.fff}

  • ${StartTime|d/MM/yyyy HH:mm}

  • ${StartTime|H:m:s.fff}

  • ${StartTime|yyyy-MM-dd HH:mm:ss|L} -> formats a local time stamp

JavaScript errors detected

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

If this problem persists, please contact our support.