Skip to main content
Announcements
Global Transformation Awards! Applications are now open. Submit Entry
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Can you color the background of a listbox field red or the text in a listbox red?

Hi all,

To start off, I am using Qlik View enterprise edition and loading data from a MySQL database.

I have a few list boxes on my main sheet and was wondering if anyone knew if it was possible for me to enter in a conditional expression into a specific list box that will change the background color OR the color of the text values to RED if a certain string is found within the values?

for example, the list box may look like this:

List Box 1
We predict that this project may fail by October 2017
It is our understanding and opinion that the project will surpass the budget by July 17, 2017
The project is 50% complete

In this example, I may want to turn the color of the list box text to red if the value contains the word 'fail'

I've tried a few conditional expressions but none have worked

If anyone has can confirm, please let me know

thanks!

7 Replies
prieper
Master II
Master II

You cannot change the color of listboxes depending any conditions.

You may think of displaying individual values in charts or textboxes instead.

Anil_Babu_Samineni

Like this?

=If(SubStringCount([List Box 1],'fail'), Red(), Green())

Capture.PNG

Or, Without Borders we can achieve

Capture.PNG

Best Anil, When applicable please mark the correct/appropriate replies as "solution" (you can mark up to 3 "solutions". Please LIKE threads if the provided solution is helpful
tajmohamed30
Creator III
Creator III

PFA attached, you can also,


go to List box properties -> presentation - Visualization e.g. LED (dont use QlikView Classic)

after that change background - select color transparence

chaper
Creator III
Creator III

Another work around is add conditional expression to list box and represent the value/text/image/guage as colored in red

Untitled.jpg

chaper
Creator III
Creator III

Using expression in list as If(SubStringCount([List Box] ,'fail'),'qmem://<bundled>/BuiltIn/led_r.png', 'qmem://<bundled>/BuiltIn/led_g.png') . Capture.PNG

Work around not exactly as per requirement

chaper
Creator III
Creator III

Check link below for using Chart as fake list box provided by johnw

how to change background colour of a list box

Another solution from amars

https://community.qlik.com/message/417393?et=watches.email.thread#417393

prieper
Master II
Master II

Would like to remind, that with all these workarounds you do loose some of the core-functionalities of a Listbox:
multiple selections, selections be text-search, advanced search etc.

Peter