GetFieldSelections - chart function
GetFieldSelections() returns a string with the current selections in a field.
If all but two, or all but one of the values are selected, the format '
Syntax:
GetFieldSelections ( field_name [, value_sep [, max_values [, state_name]]])
Return data type: string
Arguments:
Arguments | Description |
---|---|
|
The field containing the range of data to be measured. |
|
The separator to be put between field values. The default is ', '. |
|
The maximum number of field values to be individually listed. When a larger number of values is selected, the format 'x of y values' will be used instead. The default is 6. |
|
The name of an alternate state that has been chosen for the specific visualization. If the For more information, see Using alternate states for comparative analysis. |
Examples and results:
The following example uses the First name field loaded to a filter pane.
Examples | Results |
---|---|
Given that John is selected in First name. GetFieldSelections ([First name]) |
' |
Given that John and Peter are selected. GetFieldSelections ([First name]) |
' |
Given that John and Peter are selected. GetFieldSelections ([First name],'; ') |
' |
Given that John, GetFieldSelections ([First name],';',2) |
' |
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 '|');