Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

How to set a default object in a container

I have a container which has two object CH012 and CH013

How to set the default objet to CH012 when open this sheet ?

5 Replies
jonathandienst
Partner - Champion III
Partner - Champion III

When opened in Desktop - the container will display the object that was selected when the document was last saved. When opened in Server, it will be the object last viewed, or the selection when last saved as above.

You could create a macro triggered by OnOpen - but this will not work in a server environment.

Logic will get you from a to b. Imagination will take you everywhere. - A Einstein
jonathandienst
Partner - Champion III
Partner - Champion III

t1.png

Logic will get you from a to b. Imagination will take you everywhere. - A Einstein
lironbaram
Partner - Master III
Partner - Master III

hi

you select the chart you want as the default

and save the qlikview document , now when you open the model this will be display when you first enter the sheet

flipside
Partner - Specialist II
Partner - Specialist II

tmp.png

flipside
Partner - Specialist II
Partner - Specialist II

This is the macro code (from APIGuide.qvw) if you need it ...

Set ContainerObj = ActiveDocument.GetSheetObject("CT01")

set ContProp=ContainerObj.GetProperties

ActiveObject=ContProp.SingleObjectActiveIndex

msgbox("Active Object=" & ActiveObject & "  Id=" & ContProp.ContainedObjects.Item(ActiveObject).Id)

... you would need to amend it to use SetProperties code. There are other examples in APIGuide to show how to do this.