Skip to main content
Version: 8.2

converters schema section

Level: beginner

Converters are functions that modify the value of the ViewModel attribute bound to a property of the visual component. Converters provided by Creatio work similarly to Angular filters. Read more: official Angular documentation.

View an example of container usage: Implement the field value conversion on a page.

View the base converters that Creatio provides below.

Base converters

crt.ToBoolean

Converts the values of other types to the BOOLEAN type.

Values

value

ANY

The incoming value. The value whose type is not BOOLEAN.

result

BOOLEAN

The outgoing value. The converted BOOLEAN type value.

crt.InvertBooleanValue

Converts the BOOLEAN type value to the opposite BOOLEAN type value. For example, if the incoming value is true, the converter returns false, and vice versa.

Values

value

BOOLEAN

The incoming value.

result

BOOLEAN

The outgoing value.

crt.ToEmailLink

Converts an email address to a link by adding the mailTo: prefix.

Values

value

TEXT

The incoming value. The email.

result

TEXT

The outgoing value. The link to the email.

crt.ToObjectProp

Retrieves the value of the specified object property.

Values

value

CUSTOM_OBJECT

The incoming value. The name of the object property.

result

ANY

The outgoing value. The value of the object property.

Parameters

prop required

TEXT

The name of the property to retrieve.

defaultValue optional

ANY

The value to return if the property does not exist or the response is false.

crt.ToPhoneLink

Converts the phone number to a link by adding the tel: prefix.

Values

value

TEXT

The incoming value. The phone number.

result

TEXT

The outgoing value. A link to the phone number.