Qlik Community

Ask a Question

QlikView App Dev

Discussion Board for collaboration related to QlikView App Development.

Announcements
Join us for a live Q&A! September 21, 10 AM ET - Onboarding Fast in Qlik Sense SaaS! REGISTER
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

List Box with Traffic Lights

Hi

I have a field called "Sig" - there are 3 values :

-1

1

I want to create a list box with 3 traffic  lights instead of values that I can filter on.

Green traffic light (Value=1)Yellow Traffic light (Value=0)Red Traffic light Yellow Traffic light (Value=-1)

Seem to be having trouble achieving this.

Thanks

T

1 Solution

Accepted Solutions
Gysbert_Wassenaar

Use an expression for the listbox:

=if(Sig=-1,'qmem://<bundled>/BuiltIn/led_r.png',if(Sig=0,'qmem://<bundled>/BuiltIn/led_y.png','qmem://<bundled>/BuiltIn/led_g.png'))

Then on the Presentation tab change the Representation from Text to Image.You may also want to change the Image Formatting setting and the Multiline settings.

See attached qvw


talk is cheap, supply exceeds demand

View solution in original post

5 Replies
Gysbert_Wassenaar

Use an expression for the listbox:

=if(Sig=-1,'qmem://<bundled>/BuiltIn/led_r.png',if(Sig=0,'qmem://<bundled>/BuiltIn/led_y.png','qmem://<bundled>/BuiltIn/led_g.png'))

Then on the Presentation tab change the Representation from Text to Image.You may also want to change the Image Formatting setting and the Multiline settings.

See attached qvw


talk is cheap, supply exceeds demand

View solution in original post

MayilVahanan

Hi

Try like this also

list box expression

Pick(Match(Sig,-1,0,1),'qmem://<bundled>/BuiltIn/led_r.png','qmem://<bundled>/BuiltIn/led_y.png','qmem://<bundled>/BuiltIn/led_g.png')

Then on the Presentation tab change the Representation from Text to Image

Image formatting - Keep aspect

Thanks & Regards,
Mayil Vahanan R
Not applicable
Author

Silly question …..but your links… 'qmem:///BuiltIn/led_r.png'

Do I need to save an image of each traffic light on my computer and then link to the expression?

fkeuroglian
Partner
Partner

Yes Roderick, you have to have the correct root for all the pictures you will use in the local pc or the server

Not applicable
Author

Excellent- thanks guys.  Two last questions : 1.) Can I centre the images? (I have hidden the test and they show up on the right of the list box)  2.)Can I hide the null selection so that it just shows my three traffic lights?  Thanks!