Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi,
I wish to provide an inputbox with predefined Colors that I load in script
LOAD *
Inline [
CustomColor
=Red()
=Blue()
=Yellow()
'=RGB(96,112,169)'
](delimiter is ';');
Those Colors are to be used as predefined Values which fails, as the predefined values are supposed to be comma separated:
=concat(CustomColor, ',')
Can I change the delimiter for the predefined values?
Or how else can I define a color without comma
.
The inline table doesn't recognize functions. Every piece of data is considered a textstring.
If this is the expected output, you can define a variable with the value vColor = RGB(96,112,169)
then use the variable in your inline load.
Instead of the rgb() function you could use the color-index behind the rgb. How it worked see here: Colors in Qlik.
- Marcus
Are you asking Inputbox? But we don't have RGB for IB. So, I would ask you to share expected result
This should work:
LOAD Evaluate(CustomColor) as CustomColor
Inline [
CustomColor
Red()
Blue()
Yellow()
RGB(96,112,169)
](delimiter is ';');
They will be converted to RGB values but the colours will be correct.
Any function is just text until it is evaluated.
Your answer does not help, unfortunalely.
That appears to be an adequate solution however it means that I am stuck with the qlik color pallete, which I am trying to circumvent.
However, concluding from your evasion, I assume that I cannot change the parsing of the inputbox.
I would like the input box to contain the color strings and for the inputbox to accept those color strings
That is interesting, and might be helpful for another task.
Unfortunately your suggestion makes it even worse, as now every string contains commas, that lead to parsing problems in the inputbox.
Unless there is a representation of colors that does not contain color ?
I wouldn't say that there is no way to bypass it within an inputbox but I think it won't be sensible because it would need some efforts and probably also have some further disadvantages. Especially if there much easier solutions possible.
At first I suggest using a listbox and not an inputbox and then extending the suggestion from Jonathan you could use:
LOAD dual(CustomColor, num(Evaluate(ColorIndex))) as CustomColor
Inline [
CustomColor, ColorIndex
Red; Red()
Blue; Blue()
Yellow; Yellow()
OtherColor; RGB(96,112,169)
](delimiter is ';');
and then the users could just select within the listbox.
- Marcus