Qlik Community

QlikView Layout & Visualizations

Discussion Board for collaboration on QlikView Layout & Visualizations.

New Contributor

locking listbox

Please look at my attached qvw. 

As you can see my listbox box displays 1 checkbox. When the 'Made in usa' checkbox is selected, the tablebox updates correctly with car_id 5.

The problem arises when the dataset changes and contains no vehicles from usa. Remove line 5 from the inline load to test. Now that there is no values associated to usa I'd like my checkbox to be greyed out and locked. I'm sure that can be done with a trigger but I need assistance with this please.

4 Replies

Re: locking listbox

Another way of doing this is deriving the second table from the first table and rather than creating inline, create another table like this:
load car_id, manufacturer, origin inline [
car_id, manufacturer, origin
1,toyota, japan
2,volvo, sweden
3,bmw, germany
4,honda, japan
6, kia, korea
7, vw, germany

Load origin,
'Made in '&origin as Select
Resident Cars;

Select can now be your list box to select the origin countries
New Contributor

Re: locking listbox

Thanks for your response Lisa.

However I need the listbox to work as I have specified previously. There will always be a specific country that I checking for to derive this list box. And if that country is not available in the dataset, I still need the entry Made in usa to be available. Only difference is that I need the listbox greyed out and locked. Can you should be how this can be done using a trigger or macro?



Re: locking listbox

Hi Viven,

If you make selections in car_id, manufacturer or origin this behaviour will happen automatically, is this not enough ?

New Contributor

Re: locking listbox

Yes you are correct. Making another selection does grey out the checkbox. However the user is still able to uncheck it - which we do not want the user to be able to do when usa cars are not in the dataset. Therefore I thought that a trigger or macro is required. It needs to first check the data. If usa vehicles exists in the dataset then do nothing else grey out the list box and lock it so that it cannot be unchecked.

Is this at all possible?