User Tools

Site Tools


syntax:functions:astext

AsText(expression)

Category: Special function


Description

This function converts value to text.


Use cases

This is useful when you wish to validate the contents of a field or retrieve the text value of a field.


Arguments

ArgumentTypeDescription
expressionAnyThe value, result of an expression, or an error to be converted into a text value.

Return value type: Text


Remarks

  • Numbers are converted into their text representation.
  • Boolean is converted into 'TRUE' and 'FALSE'.
  • Empty cells are converted into empty strings (i.e. '').
  • Text remains itself.
  • Errors are converted into text with error message.
  • This function never produces errors, only text.


Examples

astext( 'January' )  //Returns 'January '
astext( 125 )  //Returns '125'
astext( 2 + 2 = 4 )  //Returns 'TRUE'
astext( 2 + 2 = 5 )  //Returns 'FALSE'
astext( 1 / 0 )  //Returns 'Error: Division by zero'


See also

syntax/functions/astext.txt · Last modified: 2021/09/12 23:08 by craigt

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki