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

Hiding list box based on a condition

There are two buttons and two list boxes in my dashboard. When i click on one button i need to hide one list box. Is that feasible by putting condition?

1 Solution

Accepted Solutions
Gysbert_Wassenaar

Yes, create a variable vShowHideMe and add a Set Variable action to the button to set that variable to 'Hide'. Then open the properties window of the listbox. Go to the Layout tab, select Conditional (under Show) and enter the expression =if(vShowHideMe = 'Hide', 0, 1). Now if you click the button the value in the variable should change to Hide and the listbox should be hidden. See attached example.


talk is cheap, supply exceeds demand

View solution in original post

7 Replies
Gysbert_Wassenaar

Yes, create a variable vShowHideMe and add a Set Variable action to the button to set that variable to 'Hide'. Then open the properties window of the listbox. Go to the Layout tab, select Conditional (under Show) and enter the expression =if(vShowHideMe = 'Hide', 0, 1). Now if you click the button the value in the variable should change to Hide and the listbox should be hidden. See attached example.


talk is cheap, supply exceeds demand
suresh_rawat
Creator II
Creator II

Hi Rohan,

Yes it is feasiable in qlikview.

Kindly refer the attached qvw.

Regards

Suresh Rawat

rsdhavle
Creator II
Creator II
Author

Thanks. Its is working..One more query i wanted to ask. Suppose i am passing two actions in one button. Can both actions be executed together?

Not applicable

Yes

it will work.any other trigger u can apply

Not applicable

Hi Rohan,

if u get clarified u r doubt then close the thread it will be helpful for users.

regards

Mahesh T

suresh_rawat
Creator II
Creator II

Hi Rohan,

As per my understanding, you have 2 list box and 1 button.

On click of that button one list box should show and one should hide and vice-versa.

For this kindly refer the attached qvw.

If you want something else, please elaborate.

Regards

Suresh Rawat

Not applicable

Hi Rohan,

Helpful example..

Using Actions For Hiding Sheets

Here are some examples of text boxes performing the actions of buttons. These examples place values into variables, which are then used to do something dynamic in the app.

In most of the QlikView apps I produce I have some tabs for system data that is hidden from most users. To implement this I set a variable in the load script:

let vShowDev = 0;

On the front sheet there is then a text box that has dynamic text:

=if (vShowDev = 0, 'Show', 'Hide') & ' Development Tabs'

And finally there is an Action to set the value of the variable:

=if(vShowDev = 0, 1, 0)

The toggle on the screen looks inconspicuously like this:

Show Development Tabs

All that is left then is to put the Conditional Show criteria on the correct sheets. The code for this is simply:

vShowDev = 1