GetPossibleCount
GetPossibleCount() is used to find the number of possible values in the identified field. If the identified field includes selections, then the selected (green) fields are counted. Otherwise associated (white) values are counted. .
For fields with selections, GetPossibleCount() returns the number of selected (green) fields.
Return data type: integer
Syntax:
GetPossibleCount (field_name)
Arguments:
- field_name: The field containing the range of data to be measured.
Examples
The following examples use two fields loaded to different list boxes, one for First name name and one for Initials.
Example 1: John selected in First name
GetPossibleCount ([Initials])
returns 1 as there is 1 value in Initials associated with the selection, John, in First name.
Example 2: John selected in First name
GetPossibleCount ([First name])
returns 1 as there is 1 selection, John, in First name.
Example 3: Peterselected in First name
GetPossibleCount ([Initials])
returns 2 as Peter is associated with 2 values in Initials.
Example 4: no values selected in First name
GetPossibleCount ([First name])
returns 5 as there are no selections and there are 5 unique values in First name.
Example 5: no values selected in First name
GetPossibleCount ([Initials])
returns 6 as there are no selections and there are 6 unique values in Initials.
Data used in example:
Names:
LOAD * inline [
"First name"|"Last name"|Initials|"Has cellphone"
John|Anderson|JA|Yes
Sue|Brown|SB|Yes
Mark|Carr|MC |No
Peter|Devonshire|PD|No
Jane|Elliot|JE|Yes
Peter|Franc|PF|Yes ] (delimiter is '|');