Data Types for JavaScript Function Arguments

Following is a description of data types for JavaScript function arguments.

This section applies to Function content items. See Functions.

Boolean

Valid values are as follows:

  • true

  • "true"

  • false

  • "false"

When the argument value does not match the argument type, the argument value is set to a value of False. No validation error is returned. The function executes successfully.

Numeric

A valid value is any number.

When the argument value does not match the argument type, the argument value is set to a value of 0. No validation error is returned. The function executes successfully.

Currencies

A valid value is any number.

When the argument value does not match the argument type, the argument value is set to a value of 0. No validation error is returned. The function executes successfully.

Date

Valid date formats are as follows:

Format

Example

yy-mm-dd

23-10-30

dd.mm.yy

30.10.23

mm/dd/yy

10/30/23

yyddmm

231030

The delimiter determines the expected day, month, year order.

The day, month, and year must be represented by two digits. January is 01. The first day of the month is 01. Four digit years are not accepted.

The JavaScript function returns a validation error when the argument value does not match the argument type.

Time

Valid time formats are as follows:

Format

Example

hhmm

2359

hhmm+/-hh:mm

2359+02:00

2359-10:00

For the format hhmm+/-hh:mm, the time is offset from GMT at most +13:00 and -11:00.

The JavaScript function returns a validation error when the argument value does not match the argument type.

Kvlist

A valid Kvlist is a JSON object or array.

Example valid values follow:

  • {"test": 1}

  • [{"test": 1}, {"test": "some_str"}]

When the argument value does not match the argument type, the argument value is set to the value of an empty JSON object. No validation error is returned. The function executes successfully.