GS-Base Help > Using textStats() Functions to Obtain LongText and Code Field Statistics

textStats(field, type)

Returns LongText or Code field statistics:

  1. type = 0 - returns the number of words.
  2. type = 1 - returns the number of letters and numbers.
  3. type = 2 - returns the number of letters, numbers and spaces.
  4. type = 3 - returns the number of characters as returned by type 2, plus punctuation characters and separators.
  5. type = 4 - returns the number of newline characters.

NOTE: this function should be used in calculated Text fields.
To obtain the total physical size of the LongText or Code field, use the len() function.

=textStats(memo, 0)
=textStats(description, 3)