Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
peschu123
Partner - Creator III
Partner - Creator III

Toggle Selection with 2 Buttons and 1 variable

Hi Community,

this is just a question because I'm curious about it.

I have 2 buttons (Textobjects).

Action = Toggle Select (and setting variables)

1. Toggle Select Field: [Order Delivered]  --> Search String= Yes

2. Toggle Select Field: [Order Delivered]  --> Search String= No

Possible States in [Order Delivered]:

1. Nothing selected (All Values)

2. "Yes" selected (Actuals only)

3. "No" selected (Forecast only)

4. Yes & No selected (Act & FC together, All Values)

Is there an "easy"(no complex IF()) way to use only one variable to do this? The easiest way I can imagine is to work with 2 variables. Getfieldselections() would be possible too but is not as simple as to use 2 variables.

Best Regards,

Peter

5 Replies
giakoum
Partner - Master II
Partner - Master II

Gysbert_Wassenaar

Use a listbox instead. No variables and buttons needed. You can set the style of the listbox to Windows Checkboxes or LED Check boxes if you want to make it easy to select/deselect individual values using the Selection Style Override option on the Presentation tab of the properties window of the listbox.


talk is cheap, supply exceeds demand
peschu123
Partner - Creator III
Partner - Creator III
Author

Hi Gysbert,

sure this would be the easiest way.

But it really don't fit to my design. Those checkboxes and corner tag etc. need a lot of space. I know this sounds funny, but compare it to qlikview classic. Since my buttons just need act/fc as text (or an image). And it is not possible to change color for qlikview classic no font, and no other color than green for selected items. I even can't change the size only font size has an impact.

So it is really not an option.

Gysbert_Wassenaar

Use a multibox instead if space is a concern. It is possible to change the selection colors using a document extension or with a macro.


talk is cheap, supply exceeds demand
peschu123
Partner - Creator III
Partner - Creator III
Author

It will be published via QV Accesspoint.

So macro is not possible. Multibox looks very different on QV AP than in QV Desktop. I tried a lot of possiblities before I decided to make it with textobjects.

I think an extension would be an option, I remember that I saw a post about this topic somewhere in the web. But since I have no experience with this, I will stick to my 2 variables and thats it.

But thank you for your help and tips.