User Tools

Site Tools


syntax:functions:astext

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Next revision
Previous revision
Last revisionBoth sides next revision
syntax:functions:astext [2015/01/29 22:19] – created dmitrysyntax:functions:astext [2021/09/12 23:07] craigt
Line 1: Line 1:
-===== AsText(value) =====+====== AsText(expression) =====
 +Category:  Special function
  
-Converts the //value// to text.+\\  
 +=====Description===== 
 +This function converts //value// to text.
  
-Boolean is converted into TRUE and FALSE.+\\  
 +=====Use cases===== 
 +This is useful when you wish to validate the contents of a field or retrieve the text value of a field.
  
-Text remains itself.+\\  
 +=====Arguments===== 
 +^Argument^Type^Description^ 
 +|expression|Any|The value, result of an expression, or an error to be converted into a text value.|
  
-Errors are converted into text with error message.+**Return value type:** Text
  
-Empty cells are converted into empty strings (i.e. '').+\\  
 +=====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.
  
-Numbers are converted into their text representation.+\\  
 +=====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)]]
  
-This function never produces errors, only text. 
syntax/functions/astext.txt · Last modified: 2021/09/12 23:08 by craigt

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki