Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
 
					
				
		
I would like the text on the buttons atached to turn red when active.
The toggle facility is loaded into each button and the user can add stops by clicking on each button in turn. I can only get one button at a time to show as red text but what I want is for the text on each button to remain red until the selection is cleared
 
					
				
		
 stevedark
		
			stevedark
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		Hi Glenn,
You want the expressions:
=If(maxstring({<Stop*={'MKT'}>}Stop)='MKT',LightRed())
and
=If(maxstring({<Stop*={'PIC'}>}Stop)='PIC',LightRed())
Note the * symbol in the Set Analysis - this takes into account your actual selections in that field and overlays the value in the set. This should then give you the highlighting you want.
Steve
 Gysbert_Wassena
		
			Gysbert_WassenaTry =If(GetSelectedCount(Stop) AND SubStringCount(concat(distinct '^'& Stop & '^'),'^MKT^'),LightRed())
See attached qvw.
 MK_QSL
		
			MK_QSL
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		Like this?
 
					
				
		
or simply
if(GetFieldSelections(Stop) like '*PIC*',lightred())
for PIC button font color and
if(GetFieldSelections(Stop) like '*MKT*',lightred()) for MKT button font color
 SunilChauhan
		
			SunilChauhan
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		see the attched image
hope this helps
 Gysbert_Wassena
		
			Gysbert_WassenaWow, that's an elegant solution. Thank you for that.
 MK_QSL
		
			MK_QSL
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		Hi Gysbert,
Nice solution...
is there any specific reason you have added...
'^'& Stop & '^'
 
					
				
		
 stevedark
		
			stevedark
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		Thanks Gysbert.
I'm a big fan of using colours on text boxes to convey information, so often use solutions like that one. I've a number of tips an tricks explained in this example document:
QlikView App: At The Qlik Of A Button
Steve
 Gysbert_Wassena
		
			Gysbert_WassenaTo make sure only the right Stop value (the exact match) will be matched by the substringcount function. But Steve's solution is much nicer. It a lot simpler and shorter.
