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

Announcements
Join us in Bucharest on Sept 18th for Qlik's AI Reality Tour! Register Now
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
rustyfishbones
Master II
Master II

Cool, please share your app showing this simple approach

CELAMBARASAN
Partner - Champion
Partner - Champion

Hi Mike,

Qlikview doesnot has the function of getting this sheet id and only has active sheet id. You can only achieve this with different expression.

The expression you wrote will always returns true for all the tabs. Only solution I can give is use different expression for each and every tab.

Instead of remembering the sheet id , you can use On Activate sheet trigger to set variable as you desired and go with your format in your expressions.

Attached sample.

Regards,

Celambarasan

paulyeo11
Master
Master

Hi Cel

your approach even better then mine. because i don't need to remember sheet name , just number.

but when i try to create a new sheet4 ID = 05, and i insert the expression at custom color .

=if(vActiveSheet = 5, ARGB(255,255,160,65), ARGB(255,225,225,225))

it does not work , why ? what i miss out ?

paulyeo11
Master
Master

Hi Alan

http://community.qlik.com/message/366772#366772

Above is not from me is from Gysbert.

rustyfishbones
Master II
Master II

Thanks

rustyfishbones
Master II
Master II

Hi All,

here is a new video showing 8 different options to change Tab Colour.

http://youtu.be/g1vIwNx8DMQ

Although I still think none of them will answer the original question, but hey!!! I am sure it will help some people out