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: 
alec1982
Specialist II
Specialist 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
MayilVahanan

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..

Thanks & Regards, Mayil Vahanan R
Please close the thread by marking correct answer & give likes if you like the post.
alec1982
Specialist II
Specialist II
Author

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,

MayilVahanan

HI

PFA

script.PNG

Thanks & Regards, Mayil Vahanan R
Please close the thread by marking correct answer & give likes if you like the post.
alec1982
Specialist II
Specialist II
Author

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
Specialist II
Specialist II
Author

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

Thxs,

MayilVahanan

Hi

Please see the  sheet properties -> Trigger ..

edit actions...

In that u can see what you want..

Hope it helps

Thanks & Regards, Mayil Vahanan R
Please close the thread by marking correct answer & give likes if you like the post.
alec1982
Specialist II
Specialist II
Author

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
Specialist II
Specialist II
Author

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

MayilVahanan

Hi

Demote the macro trigger at last n tested once..

May be it helps

Thanks & Regards, Mayil Vahanan R
Please close the thread by marking correct answer & give likes if you like the post.