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

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Set selection on open sheet

Hi,

I have a sheet that is to show a specific selection in a type column. I load the table as main.type and it holds Type A, Type B and Type C. Now in my sheet "MAIN" i want it to automatically select "Type A" and not show results for Type B or Type C.

I have thought about doing this either by inputting something extra in my LOAD statement, or perhaps by using a trigger, but I cannot get it to work either way. Any ideas?

Cheers,

1 Solution

Accepted Solutions
Not applicable
Author

Yeap 🙂

1) First make sure that all current selections are clear.

2) Select both Type´s (B and C) with CTRL key pressed ;

3) Create a new bookmark at bookmark menu (The mine one is at Portuguese, but i believe that prints could by helpful)

01.png

3) Give a friendly name to you bookmark

02.png

4) After did it, press Ctrl + Shif + B to view bookmark lists, then search to you bookmark Id

03.png

5) Go to sheet triggers and set action Bookmars, Apply new bookmark, then set the Bookmark id

This will apply the combined types

View solution in original post

18 Replies
Not applicable
Author

You may go at Sheet properties, Triggers and add an OnActivate trigger action to remove all selections, adding a Clear selection action and after that add an A field selection.

Anonymous
Not applicable
Author

Nils

On the Sheet Properties go to the Triggers tab and create a trigger to do the selection OnActivateSheet.

BEWARE:  Some triggers do not work on the Ajax, so do test that scenario.

Best Regards,     Bill Markham

Not applicable
Author

How do I set the triggers? I'm not really good at that . I assume I would set it as:

1. OnActivateSheet >> Select Possible >> " "

2. OnActivateSheet >> Clear All

3. OnActivateSheet >> Select in Feild >> Feild = main.type | Search String = 'Type A'

I cannot seem to get this to work however...

Not applicable
Author

If your intent is not simply select the field type A for example but avoid the user to select another dimensions (B and C) You can set triggers to select the right dimension at activate sheet and block another dimensions like:

  1. First of all, clear all selections using a clear all action;
  2. Do the right selection to the Field A;
  3. If you do not want the user select another dimensions, set a trigger to block fields type B and C;
  4. After this at another other sheets except main, release the fields B and C for user;

To set your triggers, right click at sheet, properties then go to triggers tab,

Hope this helps,

João Dias

Not applicable
Author

thank you! this is exactly what i want, however i think im getting the field setup wrong. to select fields i do this:

3. OnActivateSheet >> Select in Feild >> Feild = main.type | Search String = 'Type A'   -- correct?


and then to exclude i set it up as:

3. OnActivateSheet >> Select Exclude >> Feild = main.type = 'Type B' or 'Type C'


?

Not applicable
Author

You must set the field value with no quotes such like Type A not 'Type A'.

Also create two actions for Type B and Type C for exclusion

As Bill exposed previously beware with ajax non working scenarios

Not applicable
Author

ok, i think i got the selection correct now, however after running the script i get a different result than what i get when i just select "Type A" in my selections list. Why is that?

Not applicable
Author

Sorry if I miss your explanation,

Did you said that you ran your script again and the results differs when you get values for Type A selections made manually from when do you activate the sheet and the trigger fires?

Not applicable
Author

yes, exactly. i have no idea why that is? it also does not high light "Type A" in the selection box i have - i would have expected it to. is it suppose to do that?