Free cookie consent management tool by TermsFeed typeof() Function
typeof() Function

Function

typeof( value )

Returns the type number of a given value.

Parameters

Keyword Type Description

value

Any Type

The value to be inquired for type. For example, typename(typeof(123)) might return "Integer (Number)".

Returns

Integer

Examples

typeof(123) returns 1, which is the numerical representation of the Number (Int) system data type.

1
typeof(123)

Returns 1, which corresponds to the Number (Integer) system data type.

Comparing data types

1
typeof(loggedinuser()) = type!User

Returns true.

Returning multiple data type numbers

1
2
3
4
5
6
7
8
typeof(
  "abc",
  0.5,
  47,
  date(1985, 12, 10),
  a!map(first: 1, second: 2),
  {order: 1906, units: 46}
)

Returns { 3, 2, 1, 7, 252, 94 }, which correspond to Text, Number (Decimal), Number (Integer), Date, Map, and Dictionary, respectively.

Returning list type numbers for lists

1
typeof({ 1, 2, {}, 17 }, {"abc", "", "def"})

Returns { 101, 103 }, which correspond to List of Number (Integer) and List of Text String, respectively.

1
typeof({ {1,2}, {1.0} })

Returns 102, which corresponds to List of Number (Floating Point). Nested lists are flattened and treated as one list.

1
typeof({ {1,2}, {"as", 2.0} })

Returns 197, which corresponds to List of Variant.

Feature compatibility

The table below lists this function's compatibility with various features in Appian.
Feature Compatibility Note
Portals Compatible
Offline Mobile Compatible
Sync-Time Custom Record Fields Compatible

Can be used to create a custom record field that only evaluates at sync time.

Real-Time Custom Record Fields Incompatible

Custom record fields that evaluate in real time must be configured using one or more Custom Field functions.

Process Reports Compatible
Process Events Compatible
Open in Github Built: Fri, Mar 22, 2024 (05:04:28 PM)

typeof() Function

FEEDBACK