Skip to main content
Announcements
Have questions about Qlik Connect? Join us live on April 10th, at 11 AM ET: SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

how to display listboxes using with button object?

hi.

I created  2 listboxes in qlikview.that are  1.productid listbox and 2.dateupdate listbox.  and create 2 buttons for each listbox.I use variable for one button object like this vshowhideobject i use expression like this if(vshowhide=1,0,1) after i apply  variable in list box layout tab in conditional like  this  vshowhide=1.I applied same method in another listbox  using button in qlikview.  if  i select product button then display productid listbox .ok it working well.but the problem is second button if i select date button then display only date listbox but it displayed 2 listboxes .I want display listboxes like this.If i select product button then display only productlistbox.if i select date button then display only date listbox.but  when i select date button it display two objects.I want display listboxsas per button selections.I do not know how to finish this task.can you help me pls.

1. it is working .

Capture22.PNG

2.I want display like this.

Capture23.PNG

3.the problem is when i select date button it  display 2 listboxes like this.

Capture24.PNG

4.I  want display  like this  if  i select  product button then display only productidl istbox.and if i select date button then display date listbox.how to display like this .can anyone help to me ? pls.

                                Thankyou

Regards

madhu

9 Replies
Gysbert_Wassenaar

If you want the buttons to act independently of each other then you'll have to use separate variables. If you use the same variable for both listboxes then both listboxes will respond to both buttons.


talk is cheap, supply exceeds demand
prieper
Master II
Master II

When putting one variable to 1, sametime add to put the other to 0

HTH Peter

Gysbert_Wassenaar

That scenario would not need two variables. You'd set one listbox to use =vshowhide as conditional display expression and the other to use =NOT vshowhide.


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

if you want only 1 list box at a given instance create a  2 variables vproduct and vdate and give value as 1 or 0 in actions for the two button respectively and opposite values in the list boxes it will work as hide and show kind of feature.

Not applicable
Author

hello gysbert.I use variable like this vshowhide and wrote conditional  like this if(vshowhide=2,0,2) for date button.another prooductid button variable vshowhide =conditional =if(vshowhide=2,1,2).

i don 't know how to write variables . can explain with examples gybert pls

   thankyou

Regards

madhu

sujeetsingh
Master III
Master III

Reddy,

Just go to reference document and study about the variables.

Well you can create the variables in Qlikview by these threads

Creating variables in qlikview

how to set variable???

PrashantSangle

Hi,

On Button Click You Setting variable value

like

on click of Product Button

are setting vshowhide=1

on click of Date Button

are setting vshowhide=2

Then on Conditional of list box write

for product id listbox

if(vshowhide=1,0,1)

for Date list box

if(vshowhide=2,0,1)

0 and 1 represent true/false value.

Regards

Great dreamer's dreams never fulfilled, they are always transcended.
Please appreciate our Qlik community members by giving Kudos for sharing their time for your query. If your query is answered, please mark the topic as resolved 🙂
prieper
Master II
Master II

When working with alternate view/show you may also trigger like

vshowhide = NOT(vshowhide)

This will always toggle betw true and false provided there is a value set in the beginning (or in the script)

HTH Peter

Not applicable
Author

Hi Madhu,

You can create variable in Settings --> Variable Overview by clicking 'Add' button.

Then you need to give condition in Layout tab as $(vShowhide)=1 for Product listbox and $(vShowhide)=2 for dateupdate.Then you can take two buttons and in actions you can take Set Variable and for Products Button give $(vShowhide)=1 and for dateupdate give $(vShowhide)=2. That's it!

Please find attached QVW.

Thanks,

Chiru