Qlik Community

QlikView Scripting

Discussion Board for collaboration on QlikView Scripting.


Breathe easy -- you now have more time to plan your next steps with Qlik!
QlikView 11.2 Extended Support is now valid through December 31, 2020. Click here for more information.

Not applicable

ARGB in the script


I have an "agency" field and I try to set a specific color per branch. I would like to optimize my graphics and thus make this method through the script (and not having to specify each time in my expression, in background color more precisely, the formula to usa).

To know that my QlikView QVD project generates files (one file per table QVD).

Besides that, under Excel, I have an excel file named "Parameters" with two tabs, one calling itself "metadata" (I renamed the tables and fields) that looks like this:

TABLE.IN          TABLE.OUT          FIELD.IN           FIELD.OUT

................           ...............              ...............          .................

And the other tab naming "color" which is as follows:

NAME         A        R         G       B

Agency1     255     255     153     51

Agency2     255     0          153     0

Agency3     255     51         0        153

Agency4     255     255       255    153

I wrote this in the script but it does not work ..... :

In the script, in the COLOR tab:
LOAD NAME, argB (A, R, G, B) as nameColor
FROM [xxxxxxxxParameters.xlsx] (OOXML, embedded labels table is COLOR)

In the script, in the QVD tab:
ApplyMap ( 'COLOR' NAME) have nameColor

Can anyone help me solve my problem?



Tags (3)
2 Replies
MVP & Luminary
MVP & Luminary

Re: ARGB in the script

ApplyMap ( 'COLOR' NAME) have nameColor

This is not a correct syntax to use applymap

Applymap() needs at least two arguments:

  • the name of the mapping table, in your case color_map
  • an expression that returns the value that should be looked up in the mapping table.

You need something like Applymap('color_map', MyFieldNameHere) as NewFieldNameHere

talk is cheap, supply exceeds demand
Honored Contributor

Re: ARGB in the script

Community Browser