Qlik Community

QlikView Creating Analytics

Discussion Board for collaboration related to Creating Analytics for QlikView.

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.[*-)]

Tags (1)
1 Solution

Accepted Solutions
Not applicable

AW:Selecting multiple values in a certain field

Hi,

you can do it withToggleSelect:

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



Kind regards.
6 Replies
Not applicable

AW:Selecting multiple values in a certain field

Hi,

you can do it withToggleSelect:

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



Kind regards.
MVP
MVP

Selecting multiple values in a certain field

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

AW:Selecting multiple values in a certain field

Thank you very much!

Have a nice day!

Not applicable

Selecting multiple values in a certain field

Thank you very much!

I will look up for those!

Not applicable

Re: Selecting multiple values in a certain field

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

Not applicable

Re: Selecting multiple values in a certain field

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 ?

Community Browser