Qlik Community

New to QlikView

Discussion board where members can get started with QlikView.

Announcements

Breathe easy -- you now have more time to plan your next steps with Qlik!
QlikView 11.2 Extended Support is now valid through December 31, 2020. Click here for more information.

alec1982
Valued Contributor II

List box properties

Hi guys,

I have a list box where I needed to give the user the ability to  select only one value which is an option available on the general tab--> "Always One Slected value"

How can I make the list box to be cleard off when the user moves to other tabs.

Note that I have a clear all trigger on the sheets but because of the One Selected Value that list box is not getting cleared off.

Anybody has an idea?

Thxs for your help

Alec,

14 Replies

Re: List box properties

HI

Use in macro:

Sub AlwaysOneSelected

    set obj = ActiveDocument.GetSheetObject("LB02")

    set boxfield=obj.GetField

    set fprop = boxfield.GetProperties

                fprop.OneAndOnlyOne = True

            boxfield.SetProperties fprop

End Sub

Sub RemoveAlwaysOneSelected

    set obj = ActiveDocument.GetSheetObject("LB02")

    set boxfield=obj.GetField

    set fprop = boxfield.GetProperties

            fprop.OneAndOnlyOne = False

            boxfield.SetProperties fprop

            ActiveDocument.ClearAll True

End Sub

I learn from Deepak Vadithala  from this post:

http://community.qlik.com/message/154380#154380

Hope it helps u also..

alec1982
Valued Contributor II

Re: List box properties

Hi,

thanks for the information.

I have never created macros yet.

May you please tell me where should I type the script that you provided ?

Thxs again

Alec,

Re: List box properties

HI

PFA

script.PNG

alec1982
Valued Contributor II

Re: List box properties

Hi,

Thxs again for the sample. it is exactly what I am looking for but I don't know how to create the Macro.

I know how to call it if it is already created but don't know how to create it.

I appreciate it if you can provide how to create a macro

Thxs,

Alec

alec1982
Valued Contributor II

Re: List box properties

I also know how to access the Edit Module but don't know how to add the macro

Thxs,

Re: List box properties

Hi

Please see the  sheet properties -> Trigger ..

edit actions...

In that u can see what you want..

Hope it helps

alec1982
Valued Contributor II

Re: List box properties

Thxs, I got it.

My question was where should I type the script in theedit Module. I just copied it there and everything is working.

Have a wonderfull weekend!

Alec

alec1982
Valued Contributor II

Re: List box properties

Hi again,

I am still getting an issue.

When I apply the macro on a trigger it works but at the same time I loose all the other triggers on the same sheet.

The triggers that I have on the sheet are listed after the macro run and they are selections on different fields.

I appreciate any help!

Thxs,

Alec

Re: List box properties

Hi

Demote the macro trigger at last n tested once..

May be it helps

Community Browser