Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

vToggle font color by selction

Hi All,

I have a text object of which I would like that the font colour will be changed if being clicked on - but struggling with this.

In the text object properties I have the following added:

@Actions

  - added "Set Variable"

    - Variable: "vToggle"

    - Value: = not vToggle


@Font

- Calculated Base Color: =if($(vToggle), blue(), yellow())

In the Variable Overview Settings:

Variable Name: vToggle

Value: -1

All other settings are untouched. Anyone knows why my text object is not changing color once I click on it.



Unfortunately not able to upload qvw.

1 Solution

Accepted Solutions
tresesco
MVP
MVP

Try removing the $ sign, like:         if( vToggle, blue(), yellow())

View solution in original post

6 Replies
Anil_Babu_Samineni

I really don't know why are you doing long process

Create variable like var

Then, text object color section use this

If (var=1, reqtextcolor, default)

Best Anil, When applicable please mark the correct/appropriate replies as "solution" (you can mark up to 3 "solutions". Please LIKE threads if the provided solution is helpful
Not applicable
Author

Sorry Anil,

Not following you on this..

could you explain it to a rookie?

tresesco
MVP
MVP

Try removing the $ sign, like:         if( vToggle, blue(), yellow())

Not applicable
Author

thanks both. It worked

Not applicable
Author

What if I want the text object to not switch to blue if the text object is yellow.
What must I add to the formula?

formula is still:  if( vToggle, blue(), yellow())

tresesco
MVP
MVP

Change in action, like:

@Actions

  - added "Set Variable"

    - Variable: "vToggle"

   - Value: = if( vToggle, -1, 0)