Qlik Community

QlikView Layout & Visualizations

Discussion Board for collaboration on QlikView Layout & Visualizations.

QlikWorld 2020: Join us May 11 - 14, 2020 in Phoenix, AZ. Register early and save $400. Learn More
New Contributor III

Dynamic Text Box Colors Using Formulas

I'm trying to design an app that removes the tabrow and replaces it with buttons of my own. Is there a best practice for setting the background and font colors through a variable? I would like to write a formula that changes the background color on the tab based on the active sheet. For example, right now I have:


If(GetActiveSheetID = 'Sht1', 'Red', 'Gray')

If(GetActiveSheetID = 'Sht2', 'Red', 'Gray')


If(GetActiveSheetID = 'Sht1', 'White', 'Black')

If(GetActiveSheetID = 'Sht2', 'White', 'Black')

(Note: will sub RBG(X,X,X) for the colors in the actual script)

Doing it this way, however, means that I have to write n formulas for n buttons. Is there a way to manage this all in one variable, potentially with the ability to query the value of the text in the text object itself? Basically, I'd like to end up with one (1) background color formula and one (1) font color formula, for n buttons. I apologize in advance if this makes no sense. Any help would be appreciated. Thanks!

1 Reply

Re: Dynamic Text Box Colors Using Formulas

May be you want to explore variable with parameter: Variables with Parameters