Skip to main content
Announcements
Join us at Qlik Connect for 3 magical days of learning, networking,and inspiration! REGISTER TODAY and save!
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Value forced to get selected when User tries to clear selection

Hello Team,

Is there a way that whenever a user tries to clear selection, i enforce a value from a dimension to get selected.

I do not want to use 'Always one Value Selected ' option.

Thanks

Khushboo

8 Replies
Kushal_Chawda

Give a Button with name "Clear All" and apply two actions on Button

1) 1st Action  - Clear All

2) 2nd Action - Select in Field

see this

Trigger to select a value on Clear | Qlik Community

Chanty4u
MVP
MVP

use

IfGetSelectedCount(Dim)=1

Not applicable
Author

Chanty,

Thanks for your answer.

Where can i use this?  fGetSelectedCount(Dim)=1

Thanks'

Khushboo

Chanty4u
MVP
MVP

go to -->Document Properties---> Select  one triigger for  Clear all---->

and select one more trigger for select in field --->  and give that condition.

Colin-Albert

There are several ways to achieve this.

  • You can set a "clear state" so clicking clear reverts to a predefined set of values.
  • You could use a bookmark.
  • You could add a button with Actions to set the desired values.
  • You could lock fields.
  • You could use triggers.

Of these a bookmark or button with actions would be my preferred options as this retains the standard QlikView functionality.

Triggers may confuse users as they may not be aware of why a trigger is being actioned, also if you use the Ajax client, not all triggers are active.

settu_periasamy
Master III
Master III

May be try with 'Clear State' Option.

Select Any Dimension Value -> Set Clear State (in the Clear All Option)

So, Until you reset your clear stare, Whenever the 'Clear All', It will select your default selected value.

Chanty4u
MVP
MVP

one more option am not sure...but u can use clear.PNG

qliksus
Specialist II
Specialist II

Hi,

Create a Variable with the following expression

if( isnull(GetCurrentSelections()),1,0)

Now go to document properties and call the trigger on  "OnChange" event of this variable and  in that trigger use the select field option to select the default value .

Hope this helps