Qlik Community

QlikView Creating Analytics

Discussion Board for collaboration related to Creating Analytics for QlikView.

Not applicable

Selection order not preserved - MACRO - or need ordered list of selected value

Hi,

I'm having problem with selection order, i want "Ordered" selection, like if i select 2006-Q1,2005-Q1, 2004-Q1 it should select that in that order when write following:

Selected_Date = ActiveDocument.fields("Quarter").GetSelectedValues

Instead it gives me random selection.

for i = 0 to Selected_Date.Count - 1
StartQuarter = StartQuarter & " - " & Selected_Date.Item(i).Text
next

Then i store it in the Variable and display in the TextObject. i Want Output 2004-Q1,2005-Q1,2006-Q1

Can anyone help Please!

1 Solution

Accepted Solutions
Not applicable

Selection order not preserved - MACRO - or need ordered list of selected value

if you set the sort order in the document properties, then it should work like this:

.GetSelectedValues(0,true)



4 Replies
Not applicable

Selection order not preserved - MACRO - or need ordered list of selected value

Try 2 things:

1. check the sort order of Quarter in Document Properties

2. Set the 2nd parameter of GetSelectedValues (UseDefaultOrder) to true.

Not applicable

Selection order not preserved - MACRO - or need ordered list of selected value

Option No1 doe snot work.

Option 2 :

I tried following

1. GetSelectedValue , true - this throws exception

2. GetSelectedValue(true) throws exception

Any idea?

Thanks,

Nish.

Not applicable

Selection order not preserved - MACRO - or need ordered list of selected value

if you set the sort order in the document properties, then it should work like this:

.GetSelectedValues(0,true)



Not applicable

Selection order not preserved - MACRO - or need ordered list of selected value

You ROCK.! it worked ! Thanks a Ton.

Community Browser