Qlik Community

QlikView App Development

Discussion Board for collaboration related to QlikView App Development.

Highlighted
Not applicable

Set Clear State

Hi,

I currently want to set a dynamic clear state on my access point. In order to help navigation on my dashboard I want to prevent people on the access point being able to clear all, in particular with my date and month boxes. I have had to use a listbox expression to create my Year and Period listboxes so I do not have the option to tick the box always one selected.

I was wondering if it is possible that I set a dynamic bookmark, ie Max(FY) and/or Max(Period), as my clear state so when people clear on the access point it will revert to this state?

Perhaps there is a macro I could use also?

Any help would be greatly appreciated on the matter!!

Thanks,

James

1 Solution

Accepted Solutions
Partner
Partner

Re: Set Clear State

maybe you can use Triggers during "open document" or "opn open sheet"  to define your Max(FY) and/or Max(Period)

then call the following macro and then redefine those triggers again

sub DefineClearState
ActiveDocument.SetClearState
end Sub

View solution in original post

4 Replies
Partner
Partner

Re: Set Clear State

maybe you can use Triggers during "open document" or "opn open sheet"  to define your Max(FY) and/or Max(Period)

then call the following macro and then redefine those triggers again

sub DefineClearState
ActiveDocument.SetClearState
end Sub

View solution in original post

MVP
MVP

Re: Set Clear State

I think if you set the clear state, it will actually work same way as when you set a bookmark, i.e. if you use an advanced search expression to filter FY and Period, then set the clear state, the clear state will actually store the searches, too.

Not applicable

Re: Set Clear State

Thanks for the responses but neither seem to be working.

swuehl‌ unfortnately my listboxes are made from expressions and therefore the listbox loses the advanced search function.

@Rudolf I am unsure how using a trigger will be able to activated when using a macro for Define Clear State. Is there any way i could possibly define the clear state in the macro.

Thanks for the help!!

James

Partner
Partner

Re: Set Clear State

I am very certain, that you can define the condition in a macro

(look for API how it works, I need to look also)

and calling the macro "DefineClearState" in another sub is definitely possible