Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi All,
Can somebody give me a full syntax of GetFieldSelections with Alternate states included in it?
Thanks,
Don
Better than the HELP?
getfieldselections ( FieldName [, ValueSep [, MaxValues [, State]]])
Returns a string with the current selections in a field. It is possible to query an alternate state.
ValueSep is the separator to be put between field values. The default is ', '.
Maxvalues 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.
State is the alternate state to query.
The string that is returned can be in these forms:
'x, y,z' | If the number of selected values is Maxvalues or less, the string returned is a list of the selected values, separated with Valuesep as delimiter. |
'NOT x, y, z' | If the number of non-selected values is Maxvalues or less, the string returned is a list of the non-selected values, separated with ValueSep as delimiter, and NOT as a prefix. |
'x of y' | If the number of selected values ![]() |
'ALL' | If all values are selected. |
'-' | If no value is selected. |
<search string> | If you have selected using search, the search string is returned. |
Examples
getfieldselections ( Year )
getfieldselections ( Year, '; ' )
getfieldselections ( Year, '; ' , 10 )
Note that the alternate State argument is only available in recent 11.20 SRs (AFAIR since SR8).
Hi Swuehl,
I am using Qlikview 11.2 SR12, so i am assuming this should work. Also, can you provide a sample example for this?
Thanks,
Don
It should look like
=GetFieldSelections( Year, ', ', 10, 'AS1')