Early Access: The content on this website is provided for informational purposes only in connection with pre-General Availability Qlik Products.
All content is subject to change and is provided without warranty.
Skip to main content Skip to complementary content

GetCurrentSelections - chart function

GetCurrentSelections() returns a list of the current selections in the app. If the selections are instead made using a search string in a search box, GetCurrentSelections() returns the search string.

If options are used, you will need to specify record_sep. To specify a new line, set record_sep to chr(13)&chr(10).

If all but two, or all but one, values are selected, the format 'NOT x,y' or 'NOT y' will be used respectively. If you select all values and the count of all values is greater than max_values, the text ALL will be returned.

Syntax:  

GetCurrentSelections ([record_sep [, tag_sep [, value_sep [, max_values [, state_name]]]]])

Return data type: string

Arguments
Arguments Description
record_sep Separator to be put between field records. The default is <CR><LF> meaning a new line.
tag_sep Separator to be put between the field name tag and the field values. The default is ': '.
value_sep The separator to be put between field values. The default is ', '.
max_values 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_name

The name of an alternate state that has been chosen for the specific visualization. If the state_name argument is used, only the selections associated with the specified state name are taken into account.

For more information, see Using alternate states for comparative analysis.

Example: Chart expressions
Example Result

GetCurrentSelections ()

Returns (-) if no selection has been made on any of the fields. If selections have been made, then the value returned is the field name and the value, for example First Name : John.

Example - GetCurrentSelections fundamentals

Example - Customize a chart title to show selections

Did this page help you?

If you find any issues with this page or its content – a typo, a missing step, or a technical error – let us know how we can improve!