Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
mikecrengland
Creator III
Creator III

Help with dynamic Tab color

Hello All --

I've been changing the color of the active tab with something similar to

=if(GetActiveSheetId() = 'Document\SH24', ARGB(255,255,160,65), argb(255,225,225,225))

but it annoys me that I have to remember to call out each sheet ID. I tried to create a variable (vSheet) to use in the expression:

=chr(39)&GetActiveSheetId()&chr(39)

Then in the tab color:

=if(GetActiveSheetId() = vSheet, ARGB(255,255,160,65), ARGB(255,225,225,225))

But it doesn't work.

I added an input box to verify that vSheet brought back 'Document\SH24' (or whatever the active tab is) and it seems to work.

Now I'm stumped. Can anybody help me with what I've done wrong?

Thanks!

mike

15 Replies
Anonymous
Not applicable

Try to remove these chr(39).  Define the vSheet as

=GetActiveSheetId()

mikecrengland
Creator III
Creator III
Author

Thanks, Michael. Unfortunately, no luck.

Anonymous
Not applicable

I see.

The logic works (it is visibale in the text boxes), but it is not the logic you want.  You have to refer to the specific sheet in each sheet color properties 😞

mikecrengland
Creator III
Creator III
Author

I was afraid of that.. Oh well, it was worth a shot. Thanks!

rustyfishbones
Master II
Master II

https://www.youtube.com/watch?v=aEAUHt6GzJA&feature=youtube_gdata_player

Check out the above link to a Youtube video that may help

Anonymous
Not applicable

Hi Alan,

Your video is fine, but you still have to define the sheet id explicitly in each color expression, what Mike R attempted to avoid.

mikecrengland
Creator III
Creator III
Author

Thanks Alan. That's a clever method. But like Michael mentioned, I was hoping to avoid having different expressions on different tabs. Some would call it lazy, but I prefer 'efficient'...

rustyfishbones
Master II
Master II

You are correct,  I did not read the question correctly

paulyeo11
Master
Master

Hi Alan

Your approach is too complicated need many step. Recently I found one approach very much simple most important it serve the same purpose.