Skip to main content
Announcements
Get Ready. A New Qlik Learning Experience is Coming February 17! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

Clear all selection

Hi,

Do you know any macro or trigger for clearing selection except time?

I have many charts on different layers. I want to do something when I move from one to other chart, my selection from this chart would be cleared.

Thanks,

7 Replies
Gysbert_Wassenaar

Since QV11 charts have no object triggers so it's not possible to have an action or macro executed when you move from one chart to another. If layers means sheets then you can use a Clear Other Fields action assigned to sheet triggers. But sheet triggers may not work in the ajax client so buttons may work better.

In QV10 you can use the object triggers to add a Clear Other Fields action.


talk is cheap, supply exceeds demand
Anonymous
Not applicable
Author

Thanks for reply,

I have text object with set variable vSelection for each chart.(Each chart has conditional)

I should list all possible fields for each text object?

Regards,

Not applicable
Author

So, U need to clear all (by using trigger), when you move to the next sheet,

Then try like this.

1. Right click on the sheet, and select properties.

2. Click on last tab, Trigger.

3. Select the 2nd option Add Action (OnLeaveSheet).

4.Click on OK.

5. Click on Add button.

6. Select Action Type : Selection and Action : Clear All, click OK.


It will automatically clear all fields, when you move to the any sheet (when u  leave sheet).


Regards,

Pavan.

Not applicable
Author

Hi,

Based on pavan kumar suggestion you clear all fields using trigger for setting the selection in time field you select any one of the value in the time field and then

Right Click->Properties->General ->Choose the always one selected value so that your clear all option will not clear the time field

Hope it will help you

Thanks and regards,

S.Amuthabharathi

marcus_sommer

If you are using the fat-client or IE-Plugin you could use macros und read which object is active (or minimized/maximized) - see in APIGuide.qvw for examples like this:

rem ** minimize all active sheet objects on active sheet **

set s=ActiveDocument.ActiveSheet

objs=s.GetSheetObjects

for i=lbound(objs) to ubound(objs)

    if objs(i).IsActive then objs(i).Minimize

next

Alternatively you could control all moving, visibilities and selections per buttons or field-selections - small additional inline-table with the chart-names within a listbox.

- Marcus

Anonymous
Not applicable
Author

Hello again,

I uploaded my file.

I have some charts there. When I select something in chart, I see only my selection on these charts.

But when I click on text box, my selection should removed except Time slection (MYear or Calendars)

Do you have any idea?

Thanks,

Not applicable
Author

Hi,

PFA