Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Discover how organizations are unlocking new revenue streams: Watch here
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Multi Value select

How can i select muti values in script using "ActiveDocument.Fields("DOB").Select"

set var=ActiveDocument.fields("Month").GetSelectedValues

for i=0 to var.count-1

ActiveDocument.fields("Month").select var.item(0).text

next

this results only last value from the loop get selected......

i need all the values??? ............

2 Replies
sparur
Specialist II
Specialist II

Hi.

You should use a .ToggleSelect function.

For you example:

set var=ActiveDocument.fields("Month").GetSelectedValues

ActiveDocument.fields("Month").select var.item(0).text

for i=1 to var.count-1

ActiveDocument.fields("Month").ToggleSelect var.item(i).text

next

Not applicable
Author

Thanks lot... for ur immediate reply...