Skip to main content
Announcements
Join us at Qlik Connect for 3 magical days of learning, networking,and inspiration! REGISTER TODAY and save!
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

button group

Hy,

Is it possible to create a sort of button group.

I have tree buttons. If I click one, I want that the selection of the other two get canceled. Just one button can be aktive at the same time.

But just the selection of this two buttons should be canceled. Every other value that is selected beside the other two buttons should stay selected.

regards

7 Replies
gandalfgray
Specialist II
Specialist II

Hi Agnes

You can use a field (which you can load as an Inline Load or any way you want)

  1. Create a listbox for that field.
  2. Select one of the values. Important for next step below
  3. Go to Properties->General and check "Always one selected value"
  4. Go to Properties->Presentation and change "Selection style" if you want (I used LED in the example attached)

Thats it!

Looks like this:

selectgroup.JPG

Its not a button group but a little like it any way.

hth/gg

Not applicable
Author

thanks for your help

I still have a problem. I have three different fields and for every field a seperate button. The fields have the values 0 and 1. With every button a choose the 1-value of the field it is connectd to.

With your solution I need just one field, but I have three. How can I make one field out of three?

gandalfgray
Specialist II
Specialist II

Hi Agnes

Lets say your three fields are called One, Two and Three

Instead of using those fields create one field like this

(I just name the table Selection and the field ButtonField, you can of course name them anyway you want)

Selection:

Load Inline [

     ButtonField

     One

     Two

     Three

];

Now you have a field called ButtonField that has three values: One, Two and Three.

hth/gg

tmumaw
Specialist II
Specialist II


Have you tried using variables?  Button 1 could be vButton1 = '1' then you would set Button 2 (vBotton2 = '0') and Button 3 (vBotton3 = '0').

Not applicable
Author

How can I use variales in this case??

In other words: How can I make a variable out of a button?

tmumaw
Specialist II
Specialist II

Are you having your users click on one of the buttons and displaying data back to them based on something ?

gandalfgray
Specialist II
Specialist II

Hi Agnes

You can set the values of variables with button actions.

You do that by adding "Actions" in the Properties->Action.

Among the different actions you can add are "Set Variable" which you will find among the External acton types.

addaction.JPG

There you specify which variable to set to what value.

If you let "Button A" set 1 for field A and 0 for field B and C you will achieve what you want with buttons (you can have more than one action for a button)

Then you must have a Button B and a Button C which sets 1 for B resp C and 0 for the others

Message was edited by: GandalfGray: Added attachment sample app with buttons