Skip to main content
Woohoo! Qlik Community has won “Best in Class Community” in the 2024 Khoros Kudos awards!
Announcements
Nov. 20th, Qlik Insider - Lakehouses: Driving the Future of Data & AI - PICK A SESSION

How to - Dynamic Look and Feel

cancel
Showing results for 
Search instead for 
Did you mean: 
robert_mika
Master III
Master III

How to - Dynamic Look and Feel

Last Update:

Sep 20, 2022 1:59:53 PM

Updated By:

Sue_Macaluso

Created date:

Dec 1, 2015 4:09:58 PM

Attachments


How to - Dynamic Look and Feel

The concept here is to have colors and logo dynamically changed based on a listbox.

Steps:

1)

Download attached package and saved included picture to a folder.

2)

Create new application and copy and paste below code:

Company:

load * inline [

PickName,Company,val

pepsilogo.jpg,Pepsi,1

cokelogo.jpg,Coke,2

catlogo.jpg,Cat,3

]

;

Colors:

load * inline [

No.,      Pepsi,    Coke,Cat,Variable Name,Info

1, 'RGB(232,17,45)','RGB(184,19,33)','RGB(0,0,0)',vTabActiveBg,Active Backround

2, 'RGB(0, 133, 202)','RGB(51,11,12)','RGB(255,223,0)',vTabInactiveBg,Incative Background

]

;

T1:

load  * inline [

Product,Value,Country

A,1,Russia

B,2,UK

C,3,Poland

D,4,Germany

E,5,Czech

]

;

pics:

bundle load * Inline

[

PickName,Path

pepsilogo.jpg,'D:\Multilanguages\pepsilogo.jpg'

cokelogo.jpg,'D:\Multilanguages\cokelogo.jpg'

catlogo.jpg,'D:\Multilanguages\catlogo.jpg'

]

3)

Change this part

'D:\Multilanguages\catlogo.jpg'


to  a path with a folder with your pictures.

Reload.

4)

Create:

a) List box -  with field "Company"

b) Bar chart -- with "Product" as Dimension

                        and SUM(Values) as Expression


c) Text box-

with Representation as "Image"

and below expression in Text box:

=if(Company=Company,Info(PickName),'NA')

Capture.PNG

5)

Add 3 variables:

Capture.PNG

a) vTabActiveBg

      =$(=fieldvalue($(vCompany),1))

b) vTabInativeBg

  =$(=fieldvalue($(vCompany),2))

c) vCompany

      =Chr(39)&Company&Chr(39)



6)

In the Caption section of an object change the Base Color of " Active " and "Inactive Colors" to

"Calculated" with an expression

for "Inactive Caption" use:

=vTabInactiveBg


For "Active Caption"

=vTabActiveBg

Capture.PNG


The final picture will be similar to this one


Capture.PNG

Now you can use  the list box to change the colors and the logo of the company.

As you probably realize at this point, you can add  more variables to have every other color dynamically change this way.

Feeling Qlikngry?

How To /Missing Manual(23 articles)

Comments
vikasmahajan

Thanks for Sharing

gautik92
Specialist III
Specialist III

Good one Thanks for sharing

manojkulkarni
Partner - Specialist II
Partner - Specialist II

good one

fmazzarelli
Partner - Creator III
Partner - Creator III

Hi,

I tried to replicate what you did but I have difficulty in using Qlik sense  when you write

c) Text box-

with Representation as "Image"

and below expression in Text box:

=if(Company=Company,Info(PickName),'NA')

and

6)

In the Caption section of an object change the Base Color of " Active " and "Inactive Colors" to

"Calculated" with an expression

for "Inactive Caption" use:

=vTabInactiveBg


For "Active Caption"

=vTabActiveBg


My result is ... the image attached

Immagine.png

robert_mika
Master III
Master III

Could you attached your app?

fmazzarelli
Partner - Creator III
Partner - Creator III

I am ashamed but I do not know how to do

Anonymous
Not applicable

Thanks for sharing, I've never used the function Info() like this. I have to say an open mind is indispensable when we work with Qlik.

Version history
Last update:
‎2022-09-20 01:59 PM
Updated by: