Qlik Community

New to QlikView

Discussion board where members can get started with QlikView.

Announcements
Make your voice heard! Participate in the 2020 Wisdom of Crowds® Survey. BEGIN SURVEY
Not applicable

Clear all selections removes the logic

Hello,

I have a data set that I derive from a view after applying some logic to it.

Whenever a user clicks on the clear all selections button (not the clear button), that data set is lost and it immediately shows the entire data from the view. Is there a way to set a bookmark on the clear all selections button or is there a way to remove the button entirely?

I also tried writing a macro but that only affected the clear button and whenever the user clicks on the clear all selections button it reverts back to showing the entire data from the view.

Thanks.

Message was edited by: Rahul Nandipati

Tags (2)
1 Solution

Accepted Solutions
Highlighted
atkinsow
Valued Contributor II

Re: Clear all selections removes the logic

You'll need to determine your bookmark id first.  To do that, go to the Bookmarks menu and select 'More'.

This should show you a list of all your document bookmarks.  There will be an ID column for each bookmark.  Make note of the bookmark that you want as the default clear value.  I'm going to assume it is BM01 for this.

Cancel out of that.

Then go to the Settings >> Document Properties menu. 

Select the 'Triggers' tab.

In the Document Event Triggers, click on 'OnAnySelect'.  Then click on the 'Add Action(s)' button.

Click 'Add' to add an action.

Click on Action Type of 'Bookmark'.

Select 'Apply Bookmark'

Click 'Ok'.

In the 'Bookmark ID' field enter this formula

=if(isnull(GetCurrentSelections()),'BM01',)

Replace BM01 in the formula with whatever your bookmark id is.

View solution in original post

10 Replies
Highlighted
Partner
Partner

Re: Clear all selections removes the logic

Hi Rahul,

Try setting the Clear State.  To do this:

1. Make your default selections

2. Select Selections > Set Clear State

When a user clicks the Clear button the default selections will return to what has been set against the Clear State.

Note this will apply to the whole QlikView document.

Hope this helps.

Rod

Highlighted
Digvijay_Singh
Honored Contributor III

Re: Clear all selections removes the logic

'clear all' clears even the clear state. The workaround of removing button temporarily can be done by dragging option from menu to customize window.

Capture.PNG

Highlighted
Not applicable

Re: Clear all selections removes the logic

This Allows me to customize a toolbar. But, even then a user can right click on the screen and click on clear all selections which also goes past the clear state of the clear button.

Currently, I don't have a clear all button on my toolbar, but still the user can right click on the screen and do clear all selections. Is there a way to remove the clear all selections option or is there a workaround like attaching a boookmark to action "when clear all selection button is clicked".

Thanks

Highlighted
Not applicable

Re: Clear all selections removes the logic

Hello Rod,

I have already set the clear state on the clear button.

I wanted to do the same with the clear all/clear all selections button.

Thanks

Highlighted
Digvijay_Singh
Honored Contributor III

Re: Clear all selections removes the logic

We cannot deactivate right click. I think one way could be adopted is to create a button and trigger your bookmark from the button action. This way even accidentally user clicks on right click clear all, they can quickly revert to book mark view by button clicking if they accidentally hit clear all.

Highlighted
atkinsow
Valued Contributor II

Re: Clear all selections removes the logic

I would think you would apply a trigger at document level to apply the bookmark when getcurrentselections is null.

Highlighted
Not applicable

Re: Clear all selections removes the logic

The clear button already does that as i have set a bookmark for that, but i don't want any user to be able to see the data that they are when they click clear all selections.

Highlighted
Not applicable

Re: Clear all selections removes the logic

Can you elaborate? are you saying i should assign a macro to that trigger? I am fairly new so i do not have much idea about it.

Highlighted
atkinsow
Valued Contributor II

Re: Clear all selections removes the logic

You'll need to determine your bookmark id first.  To do that, go to the Bookmarks menu and select 'More'.

This should show you a list of all your document bookmarks.  There will be an ID column for each bookmark.  Make note of the bookmark that you want as the default clear value.  I'm going to assume it is BM01 for this.

Cancel out of that.

Then go to the Settings >> Document Properties menu. 

Select the 'Triggers' tab.

In the Document Event Triggers, click on 'OnAnySelect'.  Then click on the 'Add Action(s)' button.

Click 'Add' to add an action.

Click on Action Type of 'Bookmark'.

Select 'Apply Bookmark'

Click 'Ok'.

In the 'Bookmark ID' field enter this formula

=if(isnull(GetCurrentSelections()),'BM01',)

Replace BM01 in the formula with whatever your bookmark id is.

View solution in original post