Reference > Functions reference > Text functions > ValueCount
 

ValueCount

Returns a count of the total number of values in specified text.

Format 

ValueCount(text)

Parameters 

text - any text expression or text field

Data type returned 

number

Originated in 

FileMaker Pro 7.0

Description 

Values are text items separated by carriage returns. You can place several items together to create a carriage-return-delimited list of values. A value can be empty, a single character, a word, a sentence, or a paragraph. When you press Return you start creating a new value. The last value will be recognized with or without a trailing carriage return.

When the text parameter is a literal string as in the example below, you must insert a literal carriage return character between each item in the list. In the Specify Calculation dialog box, click the button to insert a literal carriage return character.

Notes 

If the last character in text is a carriage return, ValueCount does not recognize that carriage return as a value.

ValueCount and other functions that work with lists of values recognize all of the following characters as separators between values:

 

Character name

Unicode code point

Line feed

10

Carriage return

13

Line separator

8232

Paragraph separator

8233

When referring to lists of values, "carriage return" is used to refer to any of these separator characters.

Example 1 

ValueCount ( "Item 1¶Item 2¶Item 3" ) returns 3.

Example 2 

ValueCount ( ValueListItems ( "Employees" ; "Employee Names" ) ) returns the total number of values in the Employee Names value list in the Employees database file.

Related topics 

Functions reference (category list)

Functions reference (alphabetical list)

About formulas

About functions

Defining calculation fields

Using operators in formulas