====== 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===== ^Argument^Type^Description^ |expression|Any|The 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:asnumber|AsNumber(expression)]]