GetAlternativeCount() is used to find the number of alternative (light gray) values in the identified field.
Return data type: integer
- field_name: The field containing the range of data to be measured.
The following examples use the First name field loaded to a list box, and the following syntax:
GetAlternativeCount ([First name])
- Given that John is selected in First name, the script returns 4 as there are 4 unique and excluded (gray) values in First name.
- Given that John and Peter are selected, the script returns 3 as there are 3 unique and excluded (gray) values in First name.
- Given that no values are selected in First name, the script returns 0 as there are no selections.
Data used in example:
LOAD * inline [
"First name"|"Last name"|Initials|"Has cellphone"
Peter|Franc|PF|Yes ] (delimiter is '|');