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

making a particular object in the container to be displayed by default on opening


Hi,

Can anyone please let me know how i could make a particular chart present within a container to be displayed by default on opening.

For instance if i have 6 charts put up in the container and i would want the user to see the first chart present within the container on opening the document,how can i get that done?

I tried saving the document with the first chart appearing in the contaiiner but then once its deployed on the server it is randomly displaying  a chart present in the container.Please let me know how to configure the default chart to be displayed on opening the document.

3 Replies
Anonymous
Not applicable
Author

Whichever chart you keep open and save the document and publish it. The same chart would be visible to user when he/she lands on to the dashboard sheet. However, the only chance you would not find this happen, is when the users have already access this container over an AJAX client and they have navigated to the different chart objects, then their sessions gets retained in ajax as part of a bookmark. Hence, when the next time they login, they land onto the object which they left open on.

Not applicable
Author

For setting the default index of the container when opening the document, create a new action as follows.

1. In the main menu, go to Settings\Document Properties

2. In the Document properties window, go to the Triggers tab, click on the OnOpen option in the Document Event Triggers window and click on the Edit Action button.

3. In the Actions window, add a new External\Run Macro action and then enter the macro name SetContainerIndexDefault

Use this macro for setting the default index. Note that you must replace "CT06" with the Object Id chosen to be the default in your container.

sub SetContainerIndexDefault

Set ContainerObj= ActiveDocument.GetSheetObject("CT06")

Set ContainerProp=ContainerObj.GetProperties      

ActiveChartIndex=0

ContainerProp.SingleObjectActiveIndex = ActiveChartIndex

ContainerObj.SetProperties ContainerProp

End Sub

Default_index_container.PNG.png

Not applicable
Author

Hey Anushree,

The way I have done it in the past is by using

  • On Document Properties > Trigger > On Open  > Activate Sheet
  • On Document Properties > Trigger > On Open  > Apply Bookmark

Attached is an example. It will always open Sheet1 with Table 1 in the container no matter what.

Thanks

AJ