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

Multiple selections in a macro

Hi,

I would like to know if it is possible to set in a Macro the selection of each value in a filter one by one to make some task.

Example:

Start Macro --> Choose value "1" in the filter --> Task --> Choose value "2" in the filter --> Task --> ... --> Choose last value --> Task --> Finish Macro

Thank you for your time.

2 Replies
Anonymous
Not applicable
Author

Sure.  A simple example:

sub Macro
' Cycle by Field
set val=ActiveDocument.Fields("Field").GetPossibleValues
  for i=0 to val.Count-1
   ActiveDocument.Fields("Field").Select val.Item(i).Text
   ' YOUR TASK HERE
  next

end sub

Regards,
Michael

Not applicable
Author

Thanks,

I have already done it with the help of the QV API.

Thank you for your help and your time.