cast() Function

For a full list of functions and their feature compatibility, explore the Appian Functions table.

Function

cast( typeNumber, value )

Converts a value from its existing type to the specified type.

See also: Casting, typeof(), Delete Data Types

Parameters

Keyword Type Description

typeNumber

Number (Integer)

The type to which the value should be cast. This may be retrieved by using typeof(x), where x is a value of the intended type, or referencing a type with 'type!{namespace}type-name' (within single quotes).

value

Any Type

The value that should be cast to type typeNumber.

Returns

Any Type

Usage considerations

Referencing data types

  • To retrieve the type number, use typeof(x), where x is a value of the intended type, or reference a type with type!{namespace}type-name (within single quotes).
  • When referencing a data type, consider the impact that deleting the data type has on the expression that references it.

Examples

cast('type!{http://www.appian.com/ae/types/2009}Integer', 123.4) returns 123

cast(1, 123.4) returns 123

Open in Github Built: Mon, Dec 05, 2022 (08:15:22 PM)

On This Page

FEEDBACK