- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
How to get list of values in current selection instead of a count
Hi QlikView experts,
I am trying to find a feasible solution to a challenge and need your help!
Use case:-
In my Qlikview application, a user can select dimension values by either clicking on bar charts, straight table or slider objects. Example if user wants to select multiple Products, he/she can either select multiple bars on a chart, select values in Product column in the straight table or also can use a slider object to provide a max - min range (which selects list of Products that meet the range).
Once the selection is made, I want to be able to see (and use) all the products selected. For instance, if there are 100 products (A1, B1, C1,D1... and so on) and based on user selection criteria if 20 products get selected, I want to see the array of all the 20 products and not: 20 of 100
Current selections object or GetCurrentSelections() both by default disply: 20 of 100. How to change this (without using a macro) so that I can see list of 20 product names instead of the count?
Reason for this requirement: I want to capture the selected product list so that the information can be used for other purposes.
Thanks
Nakul
Accepted Solutions
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Personally I would prefer using GetFieldSelections() for a limited number of fields, as it might be easy to format. But if there are way to many fields, you can work with GetCurrentSelections and use the max_values to make sure that you see all the values.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Maybe something like
=If(GetselectedCount( ProductField ) = Concat(DISTINCT ProductField,', ') )
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
You can give the number of values to be shown by giving a value for max_values
But do you really need GetCurrentSelections or GetFieldSelections?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
So something like this:
GetFieldSelections(Product, ',', 100)
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thanks for the reply Sunny and swuehl. I realize I did not explain the complete scenario. I use current selections because there could be other more than one field in selection. Products is one example. There will be Product-Type,Product ID, Clients, Sub-Class, ListDate etc that could be in the selection. Should I use GetFieldSelections for each possible field instead of a single getcurrentselections function?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Personally I would prefer using GetFieldSelections() for a limited number of fields, as it might be easy to format. But if there are way to many fields, you can work with GetCurrentSelections and use the max_values to make sure that you see all the values.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Could you detail on your final goal ("Reason for this requirement: ..")?
How would you then process the result from GetCurrentSelections()?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thx! I will use this approach.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
The values in the current selections will be exported and stored. We want to be able to save snapshot of data based on the selection criteria as of that day (That is why not using a bookmark )
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Ok.
Just take care that AFAIK, GetFieldSelections() / GetCurrentSelections() will return the search string if you are using searches in e,g. list boxes or triggers, not the values themselves.