Skip to main content
Announcements
Announcing Qlik Talend® Cloud and Qlik Answers™ to accelerate AI adoption! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
chrweber
Creator
Creator

Inputbox with predifined Values using RGB, comma problem

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

.

15 Replies
Anonymous
Not applicable

The inline table doesn't recognize functions. Every piece of data is considered a textstring.input box.PNG

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.

marcus_sommer

Instead of the rgb() function you could use the color-index behind the rgb. How it worked see here: Colors in Qlik.

- Marcus

Anil_Babu_Samineni

Are you asking Inputbox? But we don't have RGB for IB. So, I would ask you to share expected result

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
jonathandienst
Partner - Champion III
Partner - Champion III

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.

Logic will get you from a to b. Imagination will take you everywhere. - A Einstein
chrweber
Creator
Creator
Author

Any function is just text until it is evaluated.

Your answer does not help, unfortunalely.

chrweber
Creator
Creator
Author

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.

chrweber
Creator
Creator
Author

I would like the input box to contain the color strings and for the inputbox to accept those color strings

chrweber
Creator
Creator
Author

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 ?

marcus_sommer

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