Skip to content

Conversion

ToString

ToString(value: any) -> string

The value as text: a list or a struct gives its JSON. No value gives no value.

output label = ToString(42)
label
"42"

ToNumber

ToNumber(value: any) -> number

The value as a number: true is 1, false is 0, and text is read as a decimal number. Anything that is not a number gives null, and so does no value.

output count = ToNumber("42")
count
42
output count = Default(ToNumber("n/a"), 0)
count
0

ToBool

ToBool(value: any) -> boolean

False for false, 0, the empty string and an empty list, true otherwise. No value gives no value.

output hasItems = ToBool([4, 8])
hasItems
true