Qlik Community

QlikView App Dev

Discussion Board for collaboration related to QlikView App Development.

cancel
Showing results for 
Search instead for 
Did you mean: 
nakul1001
Creator II
Creator II

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

1 Solution

Accepted Solutions
sunny_talwar

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.

View solution in original post

9 Replies
swuehl
MVP
MVP

Maybe something like

=If(GetselectedCount( ProductField ) = Concat(DISTINCT ProductField,', ') )

sunny_talwar

You can give the number of values to be shown by giving a value for max_values

Capture.PNG

But do you really need GetCurrentSelections or GetFieldSelections?

Capture.PNG

sunny_talwar

So something like this:

GetFieldSelections(Product, ',', 100)

nakul1001
Creator II
Creator II
Author

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?

sunny_talwar

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.

swuehl
MVP
MVP

Could you detail on your final goal ("Reason for this requirement: ..")?

How would you then process the result from GetCurrentSelections()?

nakul1001
Creator II
Creator II
Author

Thx! I will use this approach.

nakul1001
Creator II
Creator II
Author

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 )

swuehl
MVP
MVP

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.