Qlik Community

QlikView App Dev

Discussion Board for collaboration related to QlikView App Development.

Announcements
IMPORTANT security patches for GeoAnalytics Server available to download: READ DETAILS
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Create radio buttons and modify variables on click

I would like to create 4 radio buttons in QlikView. I have read that it can be done using a listbox and then from listbox properties setting presentation to LED.

1) But how to put 4 custom text inside it?

For example I want to create a listbox with this customs texts:

- Make all objects visible

- Make visible object A

- Make visible object B

- Make visible object C

I want above texts (items) to be displayed in the listbox. I want this listbox to be single selection (not multiple selection). These items are not associated to any table field.

2) I would like to modify some variables (IsObjectAVisible, IsObjectBVisible, IsObjectCVisible) value when I click on each listbox item, for example:

  • If I select "Make all objects visible", I would like to change the values of variables IsObjectAVisible, IsObjectBVisible and IsObjectCVisible to 1.
  • If I select "Make visible object A", I would like to change the value of variable "IsObjectAVisible" to 1 and change value of variables IsObjectBVisible and IsObjectCVisible to 0.
  • If I select "Make visible object B", I would like to change the value of variable "IsObjectBVisible" to 1 and change value of variables IsObjectAVisible and IsObjectCVisible to 0.
  • If I select "Make visible object C", I would like to change the value of variable "IsObjectCVisible" to 1 and change value of variables IsObjectAVisible and IsObjectBVisible to 0.
1 Solution

Accepted Solutions
maxgro
MVP
MVP

try this expression (this is for A)


=substringcount(Concat(l, '|'), 'Make visible object A')

1.png

View solution in original post

6 Replies
maxgro
MVP
MVP

example in the attachment

1.png

EDIT: changed the listbox style

Not applicable
Author

Thanks! it works like a charm!

oknotsen
Master III
Master III

If your question is now answered, please flag the Correct Answer (via the big "Correct Answer" button near every post).

If not, please make clear what part of this topic you still need help with .

May you live in interesting times!
Not applicable
Author

Hi, again!

Now I am trying to modify it by making listbox multiselection without " Make all objects visible" option. So my listbox now contains:

- Make visible object A

- Make visible object B

- Make visible object C

and I have modified variables in your example as below:

IsA = if(WildMatch(I, '*object A*'), 1, 0)

IsB = if(WildMatch(I, '*object B*'), 1, 0)

IsC = if(WildMatch(I, '*object C*'), 1, 0)

But when I select more than 1 item in the listbox at the same time is not working. Could you help me, please?

maxgro
MVP
MVP

try this expression (this is for A)


=substringcount(Concat(l, '|'), 'Make visible object A')

1.png

Not applicable
Author

It works perfectly! Thanks again!