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,

18 Replies
Not applicable
Author

Maybe another triggers are setting some dimension value to another field and data is correlated at it.

To make sure what you have selected you may put a Current Selections object and debug what´s happening at both situations;

Not applicable
Author

i have made sure that there are no other triggers selected. i also have a selections box present, but i have not seen the "Type A" selection show up in this box. please have a look again at the actions i use:

Clear All

Select in Field >> Field(main.type) Search String(Type A)

Select Excluded >> (main.type = Type B and Type C)

that is exactly how i have it written now. please correct this as you see fit .

Not applicable
Author

Thinking about it I got 2 hypothesis

1) If your data have rows with null or different types except A, B or C the result may differs cause you set the action to select types A, then excludes B and C, but do not say what to do when null or another type appears. So select A and exclude B and C differs from only Select A

2) Your triggers may set wrong at exclusion. To exclude this values you first of all must set a trigger to exclude B types then set another trigger to exclude C types. Do you combine exclusion with both types B and C?

Hope this helps

Not applicable
Author

hmm.. i think you first guess may be correct. the table may have NULLs in it. however if it cannot sort on that then this trigger thing will not do. i will need to do this in some sort of load statement.

one more question regarding this trigger. i my  selection "main.type = Type A suppose to show up in my current selections box if implemented correctly?

Not applicable
Author

i worked around a bit more with this and it seems like i need to swithc my stands on triggers - they just may do the trick ! the only thing now is the second selection, to be able to select Type B and Type C at the same time. now i have it set up as two different selections:

Select in Field >> Field(main.type) Search String(Type B)

Select in Field >> Field(main.type) Search String(Type C)


(i do this so that i can be able to easily track the changes). however doing this it only selects Type C, that is the last selection in the row. how do i get it to select both?

Not applicable
Author

One way to do this is to clear all selections and select the both types B and C,

then create a Bookmark to it, at trigger event set to apply Bookmark and set the bookmark id as reference

Not applicable
Author

im sorry, i didnt really follow that...   could you possibly explain more in detail, step-by-step?

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

Not applicable
Author

amazing! works perfectly - thank you!

(the screens helped, Portuguese was no hindrance )