Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Set multiple default values in list box on QlikView V10?

Hi ,

Can any one help me to set multiple default values in list box (Version 10).

For example, I've a field with values of A,B,C,D…I need to be selected A&D as default .

Thanks ,

Gnana

1 Solution

Accepted Solutions
luciancotea
Specialist
Specialist

sub DefaultSelection

  set f = ActiveDocument.Fields("FieldName")

  set fv = f.GetNoValues  'empty array

  fv.Add

  fv(0).Text = "A" 

  fv(0).IsNumeric = false

  fv.Add

  fv(1).Text = "D" 

  fv(1).IsNumeric = false

  f.SelectValues fv

end sub

View solution in original post

6 Replies
swuehl
MVP
MVP

Try using an OnOpen trigger in Document properties settings with action Select in field,

Product

as field and

(A|D)

as search string.

Hope this helps,

Stefan

luciancotea
Specialist
Specialist

sub DefaultSelection

  set f = ActiveDocument.Fields("FieldName")

  set fv = f.GetNoValues  'empty array

  fv.Add

  fv(0).Text = "A" 

  fv(0).IsNumeric = false

  fv.Add

  fv(1).Text = "D" 

  fv(1).IsNumeric = false

  f.SelectValues fv

end sub

Not applicable
Author

Thank you Stefan & Lucian .. It's working !

Anonymous
Not applicable
Author

But Stefan

I have Requirement where i have to select

those customer Whose name Start with 'S'

on selection of a Button 'S'


can u help it out .

Not applicable
Author

If you have a button.

Add a action, "Select in Field".

Name the Field in the Field-textbox .

In the Search string- textbox, add S*

If you want all customers that starts with S and all customers that starts with T, you can use Stefans solution...

Add ("S*"|"T*") as the searchstring in the "Select in Field" action.

Not applicable
Author

Is there any possibility with out macro.