Skip to main content
Announcements
Have questions about Qlik Connect? Join us live on April 10th, at 11 AM ET: SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

To retain/save selections among tabs without using bookmark object

Hi All,

I am developing a new tab (say Tab A) in an existing dashboard. The customer did not want the selections made in the exisiting tabs to be carried to this new tab and vice versa. That is, selections made A need to be independent. I achived this through setting the 'on activate' sheet trigger as 'clear all'..and 'on deactivate' also as 'clear all'.

But now, the requirement has changed as this.. They do some selections in Tab A, then might move to other tabs and do some selections there..and when they come back to Tab A, they want to see the selections that they have done before moving on from tab A. This means, without using book mark, I need to find some other way to save the selections made in one tab for the current session.

Do anyone have any idea if this is feasible ?

Thanks,

Vishnu

10 Replies
Not applicable
Author

Maybe you can make data islands, so that the selections of one tab cannot be carried to another tab.

Not applicable
Author

Can you please explain what you mean by data islands?

Not applicable
Author

Data islands are (groups of) tables with no connection to other (groups of) tables. So if you make a selection in one island, it doesn't affect the other island.

Not applicable
Author

Oh, that will lead to duplication of data ..creation of same data in more than one QVD

Is there any better way??

vincent_ardiet
Specialist
Specialist

Hi,

Have a look to macro.

You can automaticaly call a macro when entering or leaving a sheet.

I have no code to give to you but on the community you will some interesting articles like :

http://community.qlik.com/thread/35287

http://community.qlik.com/thread/4676

http://community.qlik.com/message/1050#1050

http://community.qlik.com/thread/27578

...

Regards,

Vincent

subin6600
Creator III
Creator III

Hi,

You could add another field with some other name like

Name

Name as Names.

This needs to be done only on the fields of selection criteria . This is faster than macros execution.

Regards,

Subin

Not applicable
Author

Thanks Vincent,

So macro seems to be the only possible option and alas, I dont know them at all.

Can anyone help me write a macro for this purpose.

That is, on leaving a sheet, this macro will save all selections made in the sheet and on re-entering the sheet, the saved selections are displayed dynamically

Anonymous
Not applicable
Author

Hi cute123,

     Here i attached a macro file for your requirement.

     Hope it will surly helpful for you to get solution..

     Check and let me know ..

     In attached file check the sheet 1 and sheet 2.

Regards

Ashok

vincent_ardiet
Specialist
Specialist

For example edit the module and use this code :

SUB GetSelectedValues


ActiveDocument.RemoveUserBookmark "savecurrentselection"
ActiveDocument.CreateUserBookmark "savecurrentselection"
ActiveDocument.ClearAll
       

END SUB

SUB RecallSelectedValues


ActiveDocument.RecallUserBookmark "savecurrentselection"
ActiveDocument.RemoveUserBookmark "savecurrentselection"

END SUB

Then on your isolate tab properties, in the triggers definition, choose GetSelectedValues (in external/Run macro) for OnActivate and RecallSelectedValues for OnLeaving.

Regards,

Vincent

SUB GetSelectedValues


ActiveDocument.RemoveUserBookmark "savecurrentselection"
ActiveDocument.CreateUserBookmark "savecurrentselection"
ActiveDocument.ClearAll
       

END SUB

SUB RecallSelectedValues


ActiveDocument.RecallUserBookmark "savecurrentselection"
ActiveDocument.RemoveUserBookmark "savecurrentselection"

END SUB