Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
 robert_mika
		
			robert_mika
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		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')
5)
Add 3 variables:
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
The final picture will be similar to this one
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?
 vikasmahajan
		
			vikasmahajan
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		Thanks for Sharing
 
					
				
		
 gautik92
		
			gautik92
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		Good one Thanks for sharing
 
					
				
		
 manojkulkarni
		
			manojkulkarni
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		good one
 fmazzarelli
		
			fmazzarelli
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		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

 robert_mika
		
			robert_mika
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		Could you attached your app?
 fmazzarelli
		
			fmazzarelli
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		I am ashamed but I do not know how to do
 
					
				
		
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.