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

Announcements
Join us to spark ideas for how to put the latest capabilities into action. Register here!
cancel
Showing results for 
Search instead for 
Did you mean: 
hugmarcel
Specialist
Specialist

Make sure initial state is always set

Hi

I have defined an initial state in the menu bar, e.g. field1 = 'x' and field2 = 'y'.

How can I make sure the initial state is always defined correctly for these 2 fields?

My experience is that the initial state gets lost sometimes after reloading the doc via script. I then have to redefine the state, but sometimes

I forget to do this.

-> It does not work with bookmarks, as bookmark will not be fired when enduser clicks the intial state button.

-> I cannot trigger the initial state with an action, and then i.e. check the =GetCurrentSelections() content.

Thx for your help!

Marcel

3 Replies
Anonymous
Not applicable

Marcel,

Did you try action "select in field"? (on open and on post reload)

hugmarcel
Specialist
Specialist
Author

Hi

It is not useful to check the content of a field, I want to check the initial state is set correctly.

To do this, I need means to trigger the initial state, and only then thereafter I should check the field content.

It's not the same.

Thx - Marcel

Anonymous
Not applicable

Is it about "Clear State"?  First I thought you meant "initial selections".

So, if you want to trigger this state, you can use macro. This should work, it doesn't clear all but applies "Clear State":

sub ClearState

ActiveDocument.Clear

end sub

After that you can check the fields.

Regards,

Michael