Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Join us in Bucharest on Sept 18th for Qlik's AI Reality Tour! Register Now
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

button object

I have created several button objects to select data based on criteria.

So people know what they have selected can I change the color of the button?

I have created variables which set my selection criteria and each button references that variable.

1 Solution

Accepted Solutions
JonnyPoole
Former Employee
Former Employee

Here is a shot at what i think you want.  I put in a <reset> button as well.  Not sure how you want that to work but give it a shot:

button1.PNG.png

button2.PNG.png

View solution in original post

8 Replies
JonnyPoole
Former Employee
Former Employee

You can definitely do this (see below).  You use a 'calculated' expression to determine the color.

Something like:    if ( variable='Selected', red(), green()) 

You can also use RGB()  color codes or even a color gradient  (colormix) to change the color.

buttoncolor.PNG.png

!

maxgro
MVP
MVP

color of the button can be a calculated expression; it can depends on your variable or a new ad hoc variable you set when the user click the buttons

kumarkp412
Creator II
Creator II

ya U can change the color of the button by a calculated expression or u can use the RGB() color codes .

saradhi_it
Creator II
Creator II

i agree with jpe   and  praveen kumar ...i think these are the answers for your reuqirement,...i give another small suggestion you can create a text box instaead of buttons and again create a small textbox(as line) or line ,when user is clicked a small line will comes and text color changes by using calculated expression

Capture.PNG.png

Not applicable
Author

ok here is what I did:

I created a (vSelect) variable.

Under my button object I went out to actions and added Set Variable and typed in =vSelect

I already had a set variable to select my selection criteria called vNetUse

then I went to actions and brought in Select in FIeld

under the field I put in my field that was going to pull the data

under Search String is typed   =$(vNetUse)

Now what is the expression I need to change the color and where do I put it?

Do I need an expression under the vSelect action

OR

Do I need the expression in the vSelect variable

JonnyPoole
Former Employee
Former Employee

Here is a shot at what i think you want.  I put in a <reset> button as well.  Not sure how you want that to work but give it a shot:

button1.PNG.png

button2.PNG.png

kumarkp412
Creator II
Creator II

u have to write the expression in vselect action to change the color

IAMDV
Master II
Master II

Hi Denise,

I've made this video tutorial some time back.

http://qlikshare.com/179/

I hope this helps!

Cheers,

DV

www.QlikShare.com