Skip to main content
Announcements
Have questions about Qlik Connect? Join us live on April 10th, at 11 AM ET: SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Is it possible to capture the list values from the list box in the selected order.

Hello Team,

Is it possible to capture the list values from the list box in the selected order.

For Example:

In the attached qvw file in the List box if I selected L2 first and then L1, I am need to display L2,L1.

instead L1,L2.

Kindly suggest.

Thanks & Regards,

MVV Satish.

10 Replies
tresesco
MVP
MVP

In the list box itself you can maintain the sort order by selection order. Sort tab->State(Auto Ascending)   and uncheck all the rest options.

vijetas42
Specialist
Specialist

Hi,

You can do this by selecting frequency as descending in sort tab

sudeepkm
Specialist III
Specialist III

It looks like the getFieldSelections() or any other functions to capture the field values are following a certain order not the order they are selected.

Not applicable
Author

Hi Tresesco,

it is not working, if we select L4 first and L1 then L2 the order is not as per the selection.

Thank you.

tresesco
MVP
MVP

Reduce the list box size to get scroll and see.

Not applicable
Author

Even then it is not working, I am trying GetFieldSelections to get the selected values .

Thanks & Regards,

MVV Satish

Not applicable
Author

Hello,

while you hold Ctr or Shift it is the same selection. After you release button, selection is finished and you have new state. This is possible to calculate difference between selection states with set analysis. You are able to manage sort order on the level of those deltas.

regards

Darek

Not applicable
Author

Hi Darek,

Could you please attach the sample file.

Thanks & Regards,
MVV Satish.

tresesco
MVP
MVP

Let me give you a hint. $1 gets the previous selection, $2 gets the previous to previous selection and so on. Hence, if you try something like:

=Concat({$1} Distinct Yourfield , ',') & ',' &Concat (Distinct Yourfield)

Say, you select '3' first and leave and then press Ctrl+'1'. Now the out put you woul get: 3,1,3

Last selection: 3

Current Selection: 1,3           // note, this is NOT only '1'

Now you have to think of a way removing last '3'. Give a try.