Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Functions are entered using the following formats:
 

<pre>
${_function}
${_function(arg1, ..., argN)}
</pre>
Panel
Html bobswift

Anchor
Formatting Rules
Formatting Rules
Formatting Rules

...

  • Functions must be written either:
    • In all lower-case

...

    • characters.

...

    • Exactly

...

    • as

...

    • shown

...

    • in

...

    • the

...

    • tables

...

    • on

...

    • this

...

    • page.

...

  • Functions have zero,

...

  • one,

...

  • or

...

  • multiple

...

  • parameters.

...

  • Each

...

  • function

...

  • parameter

...

  • is

...

  • one

...

  • of

...

  • three

...

  • specific

...

  • types:

...

    • String
    • Integer
    • Boolean
  • String parameters must be enclosed in single or double quotation marks.
  • Integer and Boolean parameters can be enclosed in single or double quotation marks.
  • Optional parameters are identified on this page by being enclosed in [square brackets]. When copying a function from the documentation, be sure to remove the square brackets; otherwise, the function will not resolve.
  • If a function has more than one optional parameter, any optional parameters preceding a specified optional parameter must be included in the function's parameter list. For example:
    • For function ${_responseJsonPath('pathExpression'[,'defaultValue','delimiter',prettyPrint])}

...

    • ,

...

    • usage

...

    • ${_responseJsonPath('.outputData','','',true)}

...

    • would

...

    • be

...

    • valid,

...

    • whereas

...

    • ${_responseJsonPath('.outputData',,,true)}

...

    • would

...

    • not

...

    • be

...

    • valid.

...

    • For

...

    • function

...

    • ${_formatDate(['date_time',

...

    • 'format',

...

    • day_offset,

...

    • use_business_days,

...

    • hour_offset,

...

    • minute_offset,

...

    • timezone])}

...

    • ,

...

    • usage

...

    • ${_formatDate('2018-09-01','',0,true)}

...

    • would

...

    • be

...

    • valid,

...

    • whereas

...

    • ${_formatDate('2018-09-01','',,true)}

...

    • would

...

    • not

...

    • be

...

    • valid.

...

  • All functions allow nesting to two levels. That is, a function can be an argument to another function, which itself can be an argument to another function.
    • You must use a double underscore preceding the name of a first-level nested function.
    • You must use a triple underscore preceding the name of a second-level nested function.

    For example, for 2nd day of next month less one Business Day:
Panel
${_formatDate('${__dayOfMonth(2,'${___dateadv('yyyy-MM-dd',0,1)}')}','',-1,true)}
</pre>

Anchor
Function Categories
Function Categories
Function Categories

...

Description

Returns a conditional value depending on the equality of two string parameters.
 
(Returns if_value if string value1 is equal to string value2; otherwise, else_value is returned.)

Syntax

${_ifEqual('value1', 'value2', 'if_value', 'else_value'[, ignore_case])}

Parameters

  • value1
    Required; First string.
  • value2
    Required; Second string.
  • if_value
    Required; Return value if value1 equals value2.
  • else_value
    Required; Return value if value1 does not equal value2.
  • ignore_case
    Optional; Specification (true or false) whether or not to ignore case when comparing value1 and value2. Default is false.

Examples


<pre>
${_ifEqual('abc','def','YES','NO')}
${_ifEqual('abc','ABC','YES','NO',true)}
${_ifEqual('2015-08-15','${__date()}','17:00','18:00')}
</pre>
Panel
Html bobswift


Return Conditional Value Depending on Value of Boolean Parameter

Description

Returns a conditional value depending on the value of a boolean parameter.
 
Returns if_value if value is true; otherwise, else_value is returned.

Syntax

${_ifTrue(value, 'if_value', 'else_value')}

Parameters

  • value
    Required; Boolean value (true or false).
  • if_value
    Required; Return value if value is true.
  • else_value
    Required; Return value if value is false.

Example


<pre>
${_ifTrue(${__isToday('Mon', 'E')},'20:00','22:00')}
</pre>
Panel
Html bobswift


Anchor
Credential Functions
Credential Functions
Credential Functions

...

Description

Checks if a date argument is equal to today's date in the specified format.
 
Returns true if date is equal to today's date in the specified format; otherwise, false is returned.

Syntax

${_isToday('date'[, 'format', is_relative])}

Parameters

  • date
    Required; Date to compare to today's date.
  • format
    Optional; Format of today's date. Default is yyyy-MM-dd.
  • is_relative
    Optional; Specification (true or false) for whether today's date is relative to the trigger/launch time of the task instance. Default is false.

Examples


<pre>
${_isToday('Wed', 'E')}
${_isToday('${__dayOfMonth(1,'','',true)}')}
</pre>
Panel
Html bobswift


Anchor
_date
_date
Resolve to Current Date and Time

<ul> <li> <code>format</code> <br>
  • format
    Optional;
  • Date
  • format.
  • Default
  • format
  • is
  • yyyy-MM-dd
  • HH:mm:ss
  • Z.
  • For
  • details
  • on
  • the
<code>format</code>
  • format parameter,
see <li> <code>day_offset</code> <br>
  • day_offset
    Optional;
  • +/-
  • number
  • of
  • days
  • to
  • offset.
<li> <code>hour_offset</code> <br>
  • hour_offset
    Optional;
  • +/-
  • number
  • of
  • hours
  • to
  • offset.
<li> <code>minute_offset</code> <br>
  • minute_offset
    Optional;
  • +/-
  • number
  • of
  • minutes
  • to
  • offset.
</ul>

Description

Resolves to the current date and time.

Syntax

${_date(['format', day_offset, hour_offset, minute_offset])}

Parameters

Html bobswift
Html bobswift

Examples


html-bobswift
Panel
<pre>
${_date} --> 2012-07-14 12:43:06 -0400
${_date()} --> 2012-07-14 12:43:06 -0400
${_date('yyyy-MM-dd', 5)} --> 2012-07-19
${_date('yyyy-MM-dd HH:mm:ss', -2, -1)} --> 2012-07-12 11:43:06
${_date('', 0, 0, 10)} --> 2012-07-14 12:53:06 -0400
</pre>


Resolve to Current Date and Time (Advanced)

<ul> <li> <code>format</code> <br>Date
  • format
    Date format.
  • Default
  • format
  • is
  • yyyy-MM-dd
  • HH:mm:ss
  • Z.
  • For
  • details
  • on
  • the
<code>format</code>
  • format parameter,
  • see
<li> <code>year_offset</code> <br>Optional;
  • year_offset
    Optional; +/-
  • number
  • of
  • years
  • to
  • offset.
<li> <code>month_offset</code> <br>Optional;
  • month_offset
    Optional; +/-
  • number
  • of
  • months
  • to
  • offset.
<li> <code>day_offset</code> <br>Optional;
  • day_offset
    Optional; +/-
  • number
  • of
  • days
  • to
  • offset.
<li> <code>hour_offset</code> <br>Optional;
  • hour_offset
    Optional; +/-
  • number
  • of
  • hours
  • to
  • offset.
<li> <code>minute_offset</code> <br>Optional;
  • minute_offset
    Optional; +/-
  • number
  • of
  • minutes
  • to
  • offset.
</ul>

Description

Resolves to the current date and time.

Syntax

${_dateadv(['format', year_offset, month_offset, day_offset, hour_offset, minute_offset])}

Parameters

Html bobswift
Html bobswift

Examples


html-bobswift
Panel
<pre>
${_dateadv} --> 2012-07-29 09:31:42 -0700
${_dateadv('yyyy-MMM', -1)} --> 2011-Jul
${_dateadv('yyyy-MMM', 0, -1)} --> 2012-Jun 
</pre>


Resolve to Current Unix Epoch Time

...

<ul> <li> <code>date_time</code> <br>Date and time in any of the following formats: <ul> <li>
  • date_time
    Date and time in any of the following formats:
    • yyyy-MM-dd
<li>
    • yyyy-MM-dd
    • HH:mm
<li>
    • yyyy-MM-dd
    • HH:mm:ss
<li>
    • yyyy-MM-dd
    • HH:mm
    • Z
<li>
    • yyyy-MM-dd
    • HH:mm:ss
    • Z.
<li>
    • yyyy-MM-dd
    • HH:mm:ss.SSS
<li>
    • yyyy-MM-dd
    • HH:mm:ss.SSS
    • Z.
</ul> Default is the current date and time. <li> <code>format</code> <br>Format of returned date. If date_time specifies a time, the default format is
    Default is the current date and time.
  • format
    Format of returned date. If date_time specifies a time, the default format is yyyy-MM-dd
  • HH:mm;
  • otherwise,
  • the
  • default
  • format
  • is
  • yyyy-MM-dd.
  • For
  • details
  • on
  • the
<code>format</code>
  • format parameter,
  • see
<li> <code>day_offset</code> <br>
  • day_offset
    +/-
  • number
  • of
  • days
  • to
  • offset.
<li> <code>use
  • use_business_
days</code> <br>Specification (<code>true</code> or <code>false</code>) for whether <code>day_offset</code> is for business days. Default is false. <li> <code>hour_offset</code> <br>+/- number of hours to offset. <li> <code>minute_offset</code> <br>+/- number of minutes to offset. <li> <code>timezone</code> <br>Time Zone that the date is formatted in. </ul><pre>
  • days
    Specification (true or false) for whether day_offset is for business days. Default is false.
  • hour_offset
    +/- number of hours to offset.
  • minute_offset
    +/- number of minutes to offset.
  • timezone
    Time Zone that the date is formatted in.

Description

Returns the date after applying offsets. Optionally, can specify the output format.
 

Note

Whether a holiday is treated as a business day or a non-business day is specified by the Exclude Holidays for Business Days Universal Controller system property.


Syntax

${_formatDate(['date_time', 'format', day_offset, use_business_days, hour_offset, minute_offset, timezone])}

Parameters

Html bobswift
Html bobswift

Example

Panel
Html bobswift

Example


Panel
${_formatDate} --> 2018-08-24 15:37
${_formatDate()} --> 2018-08-24 15:37
${_formatDate('','MMddyyyy',5)} --> 08292018
${_formatDate('2018-09-01','',5)} --> 2018-09-06
${_formatDate('2018-09-01','',-5)} --> 2018-08-27
${_formatDate('2018-10-13 12:13:14 -0400','',5,true,0,0,'Australia/Sydney')} --> 2018-10-14 03:13:14 +1100
</pre>


Return Date with Offsets (Advanced)

<ul> <li> <code>date_time</code> <br>Date and time in any of the following formats: <ul> <li>
  • year_offset
    Optional; +/-
  • number
  • of
  • years
  • to
  • offset.
<li> <code>month_offset</code> <br>Optional;
  • month_offset
    Optional; +/-
  • number
  • of
  • months
  • to
  • offset.
<li> <code>day_offset</code> <br>Optional;
  • day_offset
    Optional; +/-
  • number
  • of
  • days
  • to
  • offset.
<li> <code>use
  • use_business_
days</code> <br>Optional; Specification (<b>true</b> or <b>false</b>) for whether <code>day_offset</code> is for business days. Default is false. <li> <code>hour_offset</code> <br>+/- number of hours to offset. <li> <code>minute_offset</code> <br>+/- number of minutes to offset. <li> <code>timezone</code> <br>Time Zone that the date is formatted in. </ul><pre>
  • days
    Optional; Specification (true or false) for whether day_offset is for business days. Default is false.
  • hour_offset
    +/- number of hours to offset.
  • minute_offset
    +/- number of minutes to offset.
  • timezone
    Time Zone that the date is formatted in.

Description

Returns the date after applying offsets. Optionally, can specify the output format.
 

Note

Whether a holiday is treated as a business day or a non-business day is specified by the Exclude Holidays for Business Days Universal Controller system property.


Syntax

${_formatDateAdv(['date_time', 'format', year_offset, month_offset, day_offset, use_business_days, hour_offset, minute_offset, timezone])}

Parameters

Html bobswift

  • date_time
    Date and time in any of the following formats:
    • yyyy-MM-dd
<li>
    • yyyy-MM-dd
    • HH:mm
<li>
    • yyyy-MM-dd
    • HH:mm:ss
<li>
    • yyyy-MM-dd
    • HH:mm
    • Z
<li>
    • yyyy-MM-dd
    • HH:mm:ss
    • Z.
<li>
    • yyyy-MM-dd
    • HH:mm:ss.SSS
<li>
    • yyyy-MM-dd
    • HH:mm:ss.SSS
    • Z.
</ul> Default is the current date and time. <li> <code>format</code> <br>Format of returned date. If date_time specifies a time, the default format is
    Default is the current date and time.
  • format
    Format of returned date. If date_time specifies a time, the default format is yyyy-MM-dd
  • HH:mm;
  • otherwise,
  • the
  • default
  • format
  • is
  • yyyy-MM-dd.
  • For
  • details
  • on
  • the
<code>format</code>
  • format parameter,
  • see
<li> <code>year_offset</code> <br>Optional;
Html bobswift

Examples

Panel
Html bobswift

Examples


Panel
${_formatDateAdv} --> 2012-08-24 15:55
${_formatDateAdv()} --> 2012-08-24 15:55
${_formatDateAdv('','MMddyyyy',1)} --> 08242013
${_formatDateAdv('2012-09-01','',0,1)} --> 2012-10-01
${_formatDateAdv('2012-09-01','',0,-1)} --> 2012-08-01
${_formatDateAdv('2012-09-01','',0,0,5,false)} --> 2012-09-06
</pre>


Return Date with Time Zone

<ul> <li> <code>date_time</code> <br>Date and time in any of the following formats: <ul> <li>
  • date_time
    Date and time in any of the following formats:
    • yyyy-MM-dd
    • HH:mm
<li>
    • yyyy-MM-dd
    • HH:mm:ss
<li>
    • yyyy-MM-dd
    • HH:mm
    • Z
<li>
    • yyyy-MM-dd
    • HH:mm:ss
    • Z.
<li>
    • yyyy-MM-dd
    • HH:mm:ss.SSS
<li>
    • yyyy-MM-dd
    • HH:mm:ss.SSS
    • Z.
</ul> <li> <code>target
  • target_time_
zone</code> <br>Time zone in which to format the date and time. <li> <code>output_format</code> <br>Optional; Format of the date and time in the other time zone. </ul><pre>
  • zone
    Time zone in which to format the date and time.
  • output_format
    Optional; Format of the date and time in the other time zone.
DescriptionReturns the Date and Time in another time zone.

Syntax

${_formatDateTz('date_time', 'target_time_zone'[, 'output_format'])}

Parameters

Html bobswift

Examples

Panel
Html bobswift

Examples


Panel
${_formatDateTz('2018-10-13 01:02:03 -0400', 'Australia/Sydney')} --> 2018-10-13 16:02:03 +1100
${_formatDateTz('2018-10-13 01:02:03 -0400', 'Australia/Sydney','yyyy-MM-dd HH:mm Z')} --> 2018-10-13 16:02 +1100
${_formatDateTz('${ops_launch_time}', '${ops_time_zone}')} = ${_formatDateTz('2018-06-13 15:35:00 -0400', 'Europe/Berlin')} = 2018-06-13 21:35:00 +0200 
</pre>


Return Day of Week

<ul> <li> <code>date</code> <br>Date in any of the following formats: <ul> <li>
  • date
    Date in any of the following formats:
    • yyyy-MM-dd
<li>
    • yyyy-MM-dd
    • HH:mm
<li>
    • yyyy-MM-dd
    • HH:mm:ss
<li>
    • yyyy-MM-dd
    • HH:mm
    • Z
<li>
    • yyyy-MM-dd
    • HH:mm:ss
    • Z.
<li>
    • yyyy-MM-dd
    • HH:mm:ss.SSS
<li>
    • yyyy-MM-dd
    • HH:mm:ss.SSS
    • Z.
</ul> Default is the current date. <li> <code>first_dow</code> <br>Optional; Specification for whether the week starts on Sunday or Monday. Values are <b>sun</b> and <b>mon</b> (not
    Default is the current date.
  • first_dow
    Optional; Specification for whether the week starts on Sunday or Monday. Values are sun and mon (not case-sensitive).
  • Default
  • is
  • sun.
<li> <code>first
  • first_dow_
value</code> <br>Optional; Starting value for the first day of week. Value must be a non-negative number. Default is 1. </ul>
  • value
    Optional; Starting value for the first day of week. Value must be a non-negative number. Default is 1.

Description

Returns the day of week for the specified date as a number.

Syntax

${_dayOfWeek(['date', 'first_dow', first_dow_value])}

Parameters

Html bobswift

Example


<pre>
${_dayOfWeek} --> 6
${_dayOfWeek()} --> 6
${_dayOfWeek('2012-07-04')} --> 4
${_dayOfWeek('2012-07-04', 'mon')} --> 3
</pre>
Panel
Html bobswift


Return Days between Dates

<ul> <li>
  • If
  • return
  • value
  • is
  • >
  • 0,
  • date2
  • is
  • after
  • date1.
<li>
  • If
  • return
  • value
  • is
  • <
  • 0,
  • date2
  • is
  • before
  • date1.
<li>
  • If
  • return
  • value
  • is
  • 0,
  • date1
  • is
  • equal
  • to
  • date2.
</ul>

The start date is inclusive, but the end date is not.

<ul> <li> <code>date1</code> <br>Required. <li> <code>date2</code> <br>Required. </ul> date1 and date2 are specified in any of the following formats: <ul> <li>
  • date1
    Required.
  • date2
    Required.

date1 and date2 are specified in any of the following formats:

  • yyyy-MM-dd
<li>
  • yyyy-MM-dd
  • HH:mm
<li>
  • yyyy-MM-dd
  • HH:mm:ss
<li>
  • yyyy-MM-dd
  • HH:mm
  • Z
<li>
  • yyyy-MM-dd
  • HH:mm:ss
  • Z.
<li>
  • yyyy-MM-dd
  • HH:mm:ss.SSS
<li>
  • yyyy-MM-dd
  • HH:mm:ss.SSS
  • Z.
</ul>

Description

Returns the number of days between date1 and date2.

Html bobswift

Syntax

${_daysBetween('date1', 'date2')}

Parameters

Html bobswift

Example


html-bobswift
Panel
<pre>
${_daysBetween('2012-08-01','2012-09-01')} --> 31
</pre>


Return Non-Business Day of Month

<ul> <li> <code>index</code> <br>Required; Nth
  • index
    Required; Nth non-business
  • day
  • of
  • month.
<li> <code>date</code> <br> <ul> Date
  • date
      Date (and
    • time)
    • is
    • specified
    • in
    • any
    • of
    • the
    • following
    • formats:
<ul> <li>
      • yyyy-MM-dd
<li>
      • yyyy-MM-dd
      • HH:mm
<li>
      • yyyy-MM-dd
      • HH:mm:ss
<li>
      • yyyy-MM-dd
      • HH:mm
      • Z
<li>
      • yyyy-MM-dd
      • HH:mm:ss
      • Z.
<li>
      • yyyy-MM-dd
      • HH:mm:ss.SSS
<li>
      • yyyy-MM-dd
      • HH:mm:ss.SSS
      • Z.
</ul> Default is the current date. <li> <code>format</code> <br>Optional; Format of returned date. Default is
      Default is the current date.
    • format
      Optional; Format of returned date. Default is yyyy-MM-dd.
    • For
    • details
    • on
    • the
<code>format</code>
    • format parameter,
    • see

Description

Returns the Nth non-business day of month for the month of the date specified. Optionally, can start from the end of the month.
 

Note

Whether a holiday is treated as a business day or a non-business day is specified by the Exclude Holidays for Business Days Universal Controller system property.


Syntax

${_nonBusinessDayOfMonth(index, ['date', 'format', reverse])}

Parameters

Html bobswift
Html bobswift
<li> <code>reverse</code> <br>Optional; Specification (<b>true</b> or <b>false</b>) for starting from the end of the month. Default is false. 
</ul>

Examples

Panel Html bobswift<pre>
    • reverse
      Optional; Specification (true or false) for starting from the end of the month. Default is false.

Examples


Panel
${_nonBusinessDayOfMonth(1)} --> 2012-08-04
${_nonBusinessDayOfMonth(1,'2012-09-01')} --> 2012-09-01
${_nonBusinessDayOfMonth(1,'2012-09-01','',true)} --> 2012-09-30
</pre>


Return Nth Business Day of Month

<ul> <li> <code>index</code> <br>Required; Nth business day of month. <li> <code>date</code> <br> Date (and time) is specified in any of the following formats: <ul> <li>
  • index
    Required; Nth business day of month.
  • date
    Date (and time) is specified in any of the following formats:
    • yyyy-MM-dd
<li>
    • yyyy-MM-dd
    • HH:mm
<li>
    • yyyy-MM-dd
    • HH:mm:ss
<li>
    • yyyy-MM-dd
    • HH:mm
    • Z
<li>
    • yyyy-MM-dd
    • HH:mm:ss
    • Z.
<li>
    • yyyy-MM-dd
    • HH:mm:ss.SSS
<li>
    • yyyy-MM-dd
    • HH:mm:ss.SSS
    • Z.
</ul> Default is the current date. <li> <code>format</code> <br>Optional; Format of returned date. Default is
    Default is the current date.
  • format
    Optional; Format of returned date. Default is yyyy-MM-dd.
  • For
  • details
  • on
the <code>format parameter</code>, see <li> <code>reverse</code> <br>Optional; Specification (<code>true</code> or <code>false</code>) for starting from the end of the month. Default is false. </ul>
  • reverse
    Optional; Specification (true or false) for starting from the end of the month. Default is false.

Description

Returns the Nth business day of month for the month of the date specified. Optionally, can start from the end of the month.
 

Note

Whether a holiday is treated as a business day or a non-business day is specified by the Exclude Holidays for Business Days Universal Controller system property.


Syntax

${_businessDayOfMonth(index, ['date', 'format', reverse])}

Parameters

Html bobswift
Html bobswift

Examples


<pre>
${_businessDayOfMonth(1)} --> 2012-08-01
${_businessDayOfMonth(1,'2012-09-01')} --> 2012-09-04
${_businessDayOfMonth(1,'2012-09-01','',true)} --> 2012-09-28
</pre>
Panel
Html bobswift


Return Nth Day of Month

Description

Returns the Nth day of month for the month of the date specified. Optionally, can start from the end of the month.

Syntax

${_dayOfMonth(index, ['date', 'format', reverse])}

Parameters


Html bobswift
<ul>
<li> <code>index</code> <br>Required; Nth day of month.
<li> <code>date</code> <br> 
Date (and time) is specified in any of the following formats:
<ul>
<li> yyyy-MM-dd 
<li> yyyy-MM-dd HH:mm 
<li> yyyy-MM-dd HH:mm:ss 
<li> yyyy-MM-dd HH:mm Z
<li> yyyy-MM-dd HH:mm:ss Z. 
<li> yyyy-MM-dd HH:mm:ss.SSS 
<li> yyyy-MM-dd HH:mm:ss.SSS Z. 
</ul>
Default is the current date.
<li> <code>format</code> <br>Optional; Format of returned date. Default is yyyy-MM-dd.
<li> <code>reverse</code> <br>Optional; Specification (<b>true</b> or <b>false</b>) for starting from the end of the month. Default is false. 
</ul>


Examples


Panel


Html bobswift
<pre>
${_dayOfMonth(5)} --> 2012-08-05
${_dayOfMonth(15,'2012-09-01','MM/dd/yyyy')} --> 09/15/2012
${_dayOfMonth(1,'2012-09-01','',true)} --> 2012-09-30
</pre>



...