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


cast( typeNumber, value )

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

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


Keyword Type Description


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).


Any Type

The value that should be cast to type typeNumber.


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.

Use in portals

  • In portals, you cannot cast a value to a record type.


cast('type!{}Integer', 123.4) returns 123

cast(1, 123.4) returns 123

Feature compatibility

The table below lists this function's compatibility with various features in Appian.
Feature Compatibility Note
Portals Compatible
Offline Mobile Compatible
Custom Record Field Expressions Compatible
Process Reports Compatible
Process Events Compatible
Open in Github Built: Thu, May 23, 2024 (08:46:51 PM)

cast() Function