Qlik Community

QlikView Scripting

Discussion Board for collaboration on QlikView Scripting.

Contributor II


Hi everybody,

I need to save the current selection in my macro, then do something and then retrive the first selection state.

I get the current selection state with:

SET selection = ActiveDocument.GetCurrentSelections

But i cant find a simple way to set the selection state of document to this again.

I appreciate every help.

Best regards


1 Reply
Contributor II

Re: ActiveDocument.GetCurrentSelections

Hi Peyman,

Not sure if you are still looking for a solution. One possible way could be to create a bookmark on the selection you would like to retrieve again.

ActiveDocument.CreateUserBookmark "StateYouDesire"

(Alternative - CreateDocBookMark )

and then retrieve that state later again using:

ActiveDocument.GetBookmark "StateYouDesire"

(Alternative - Use the Bookmark object in the front-end -i.e. if it is for auditing purposes, create a variable using Dim with the current date - concatenate it to your chosen name - and use that as the name for your bookmark)

Hop this helps!

Community Browser