Qlik Community

New to QlikView

Discussion board where members can get started with QlikView.

Announcements

Breathe easy -- you now have more time to plan your next steps with Qlik!
QlikView 11.2 Extended Support is now valid through December 31, 2020. Click here for more information.

hopkinsc
Not applicable

clearing fields when chart is maximised?

Hi, can someone tell me how i can automatically clear any date selections when the user maximises a specific chart?

My date fields are :

Cal_Year

Cal_Week

Cal_Period

StoreDate

And the chart i want to maximise is

CH04

I am assuming i would use a trigger, but unsure on which one to use...

Thanks

4 Replies
nagaiank
Not applicable

clearing fields when chart is maximised?

When you are in the sheet having the chart object CH04,

Go to Settings -> Sheet Properties

Then go to Triggers tab

You can set triggers for 'OnActivate' and/or 'OnDeactivate' events of any sheet object.

Hope this helps.

christian77
Not applicable

clearing fields when chart is maximised?

Hi:

1st -----You can clear manually.

2nd -----You can use a button. Add the action Maximize the object and the action Clear All to the button.

“Document Properties” contains triggers about sheets, general, etc.

“Sheet Properties” contains triggers about objects. Properties about objects are when activating, and deactivating the object.

I didn´t see any trigger when maximizing or restoring.

3rd ------But, you may want to use a macro. I´m sure is possible.

Sub whatever

set c=ActiveDocument.GetSheetObject("CH01")

if c.IsMaximized then

ActiveDocument.ClearAll

else

end if

end sub

3 solutions in one

Have a nice weekend.

hopkinsc
Not applicable

clearing fields when chart is maximised?

Hi, thanks. I only want to clear my date fields, but when i select

ONACTIVATE>> CLEAR OTHER FIELDS>> and add StoreDate into the field box, it doesn't work.

CLEAR ALL works, but i don't want to clear ALL of the selections...

christian77
Not applicable

clearing fields when chart is maximised?

Hi:

Find APIGuide.qvw in your documentation.

ActiveDocument.Fields("Class").Clear

ActiveDocument.Fields("Class").ClearAllButThis

ActiveDocument.Fields("DateField").Select ""

Ok.