Skip to main content
Announcements
NEW: Seamless Public Data Sharing with Qlik's New Anonymous Access Capability: TELL ME MORE!
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Disable a listbox when ...

Hi guys,

I'm in trouble with a listbox.

I'd like to enable or disable a listbox when I select a field of another listbox.

For instance. I have two list box A & B.

If I select a field in listbox A, I don't want that the customer can select a field in listbox B.

Is it possible?

Thank you so much in advance.

1 Solution

Accepted Solutions
jvitantonio
Luminary Alumni
Luminary Alumni

Hi, is this what you need?

View solution in original post

12 Replies
sivarajs
Specialist II
Specialist II

Hi,

u meant to say if A is selected there should not be anything selected in B(disable)

Can u clear that..

CELAMBARASAN
Partner - Champion
Partner - Champion

Hi,

     Use macro to do this.

To disable the LB01 list box this should call on on select trigger

     Document properties-->Triggers-->Fields

Sub LB01

set LB = ActiveDocument.GetSheetObject("LB01")

set box=LB.GetProperties

box.Layout.ReadOnly = true

LB.SetProperties box

End Sub

jvitantonio
Luminary Alumni
Luminary Alumni

Hi, is this what you need?

Not applicable
Author

Hi Sivaraj,

thank you.

Yes, if I select a field in A I don't have to select a field in B.

Hope it helps.

jvitantonio
Luminary Alumni
Luminary Alumni

Giampiero, have you seen my solution? It does what you need. Please confirm

sivarajs
Specialist II
Specialist II

use

if(getselectedcount(A)=0,B) in list box

if u select anything in A it dont any show option in B

Not applicable
Author

Hi Celambarasan,

I'm not sure to understand how it works.

I create a macro LB01 then Triggers->Fields i used the macro but it doesn't work.

I'm sure I did something wrong.

I try again

THANK YOU SO MUCH

Not applicable
Author

Hi,

Thank you so much.

It works. It helps me.

May you explain me how it works? i mean, what have you done?

i don't understand. No expression. no actions. no Macro.

Thanks a lot

Not applicable
Author

Hi Sivarj,

thank you so much.

It's a good idea, but it's not exactly what I need to.

I'll try to follow this way to find a new solution.

Thanks a lot