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
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
Try =If(GetSelectedCount(Stop) AND SubStringCount(concat(distinct '^'& Stop & '^'),'^MKT^'),LightRed())
See attached qvw.
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
see the attched image
hope this helps
Wow, that's an elegant solution. Thank you for that.
Hi Gysbert,
Nice solution...
is there any specific reason you have added...
'^'& Stop & '^'
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
To 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.