Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Selecting multiple values in a certain field

Hello,

I have a question regarding using macros in Qlik.

I know how to select a value from a certain field using a macro with VBScript language, but i want to select multiple values.

Also i would like to know if i can reduce data using macros( the equivalent of reduce data from file menu ).


Please help.[*-)]

1 Solution

Accepted Solutions
Not applicable
Author

Hi,

you can do it withToggleSelect:

<pre>sub multi_select
ActiveDocument.Fields("Field1").Select "a"
ActiveDocument.Fields("Field1").ToggleSelect "b"
end sub



Kind regards.

View solution in original post

6 Replies
Not applicable
Author

Hi,

you can do it withToggleSelect:

<pre>sub multi_select
ActiveDocument.Fields("Field1").Select "a"
ActiveDocument.Fields("Field1").ToggleSelect "b"
end sub



Kind regards.
Oleg_Troyansky
Partner Ambassador/MVP
Partner Ambassador/MVP

Check out those APIs:

"SelectValues",

"SelectAndValues",

"ReduceData"

If you are not already using QlikView API Guide, I highly recommend it - it's under Program Files\QlikView\Documentation\ folder.

regards!

Not applicable
Author

Thank you very much!

Have a nice day!

Not applicable
Author

Thank you very much!

I will look up for those!

Not applicable
Author

How do I exclude only 1 value from a certain field ?

Not applicable
Author

Hi,

I am trying to make a a selection from a list box which has an expression in it.

I generally use the below syntax to select values from list box:-

listbox3=Array("<value>")

Set Qv = CreateObject("QlikTech.QlikView")

Set QvDoc = Qv.OpenDoc("<QV_File_location>")

QvDoc.GetSheetObject("<objectID")

Set fz = QvDoc.Fields("objectname")

for each v in listbox3

  fz.ToggleSelect v

next

But whenever I try to access an expression from a list box, it will have an objectID but wont have an object name  ? How can I solve for this problem ?