Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Write Table now available in Qlik Cloud Analytics: Read Blog
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

set variable

hi all,

can i set a value to a variable when i maximize (or minimize) a chart ?

thanks a lot!

k

2 Replies
sbaldwin
Partner - Creator III
Partner - Creator III

Hi, you can write a macro something allog the lines of the following:

set obj = activedocument.getsheetobject("CH01")

if obj.ismaximized then

activeDocument.Variables("CH01").SetContent "TRUE",false

else

activeDocument.Variables("CH01").SetContent "FALSE",false

end if

where you are setting the value of the variable named CH01 and the chart object id is CH01, then you can set a trigger on the document/sheet that will call the macro when ever a selection etc is made.

Thanks

Steve

oxtontom
Contributor III
Contributor III

Hi Kalinkula,

Sadly there is no way to trigger variable changes on minimise / maximise, the cleanest way of doing it is with the macro that Sbaldwin suggested.

However if you are not fond of macros you can make a button that can minimise the chart as well as set the variable when it is pressed. This can be found in the Action tab of the button menu setting a variable is the the external section of that tab and minimize / maximize is found in the layout section of the actions tab.

Hope this helps

Tom