Skip to main content
Announcements
Introducing Qlik Answers: A plug-and-play, Generative AI powered RAG solution. READ ALL ABOUT IT!
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
chrweber
Creator
Creator
Author

Thank you for that educational piece of script.

I have played a little but am not fully satisfied, yet.

I have two open questions

First, why not use an inputbox, when I want do define variables using predefined values?

Second, how can I evaluate the associated values? When I want do define the color of a textbox I can use the ColorIndex, but not the ColorName.

Best Regards

chrweber
Creator
Creator
Author

I have played a little more and it appears that I want to "dereference" the 'dualed' field.

When putting the number of the color into the color fields, they change color as expected.

Using their names, does not work

MarcoWedel

Hello Jonathan,

I was about to post the same solution until realizing you already had the idea, so I just add  a picture to your solution.

Marco

QlikCommunity_Thread_298045_Pic1.JPG

marcus_sommer

After all I'm not sure if I understand what do you want to do where and why but I think to assign a color worked both per fieldselection (also with dual-values) and per variable with a predefined valuelist created per expression. Personally I think I would prefer the selection approach.

- Marcus

chrweber
Creator
Creator
Author

Thank you for that app.

I have arrived at that solution as well.

The problem with selection is that I have 6 color variables, each with its own selectable color.

Starting from the current solution I would like to display the color labels as predefined values and then use the colors for coloring like

=only({1<CustomColor = $(vColor)>} '='&ColorVariableConcat)

But this does not appear to work