Skip to main content

Logical.FromText

Creates a logical value from the text values "true" and "false".

Syntax​

Logical.FromText(
text as text
) as logical

Remarks​

Creates a logical value from the text value text, either "true" or "false". If text contains a different string, an error is raised. The text value text is case insensitive.

Examples​

Example #1​

Create a logical value from the text string "true".

Logical.FromText("true")

Result:

true

Example #2​

Create a logical value from the text string "a".

Logical.FromText("a")

Result:

[Expression.Error] Could not convert to a logical.

Category​

Logical