User Tools

Site Tools


syntax:functions:astext

Differences

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

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
syntax:functions:astext [2015/04/17 22:51] elenapsyntax:functions:astext [2021/09/12 23:08] (current) craigt
Line 1: Line 1:
-===== AsText(value) =====+====== AsText(expression) =====
 +Category:  Special function
  
-This function converts the //value// to text. +\\  
 +=====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. This is useful when you wish to validate the contents of a field or retrieve the text value of a field.
  
-  * Boolean is converted into TRUE and FALSE.+\\  
 +=====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 'TRUEand 'FALSE'. 
 +  * Empty cells are converted into empty strings (i.e. '').
   * Text remains itself.   * Text remains itself.
   * Errors are converted into text with error message.   * Errors are converted into text with error message.
-  * Empty cells are converted into empty strings (i.e. ''). +  * This function never produces errors, only text.
-  * Numbers are converted into their text representation. +
-  * This function never produces errors, only text+
  
-^  Example  ^  Result  ^ +\\  
-astext( 'January' )  |  January  | +=====Examples===== 
-astext( 125 )  |  125  | +  astext( 'January' )  //Returns 'January ' 
-astext( 2 + 2 = 4 )  |  TRUE  | +  astext( 125 )  //Returns '125' 
-astext( 2 + 2 = 5 )  |  FALSE  | +  astext( 2 + 2 = 4 )  //Returns 'TRUE' 
-astext( 1 / 0 )  |  Error: Division by zero  |+  astext( 2 + 2 = 5 )  //Returns 'FALSE' 
 +  astext( 1 / 0 )  //Returns 'Error: Division by zero'
  
 +\\ 
 +=====See also=====
 +  * [[syntax:functions:asnumber|AsNumber(expression)]]
  
-=== See also === 
-  * [[syntax:functions:asnumber| AsNumber(value)]] 
syntax/functions/astext.1429325474.txt.gz · Last modified: 2015/04/17 22:51 by elenap

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki