Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

Change colorvalue in predefined variable using the FieldIndex statement

Hi everyone

I have a problem getting an expression to be valid.

I have defined some color-variables which I can use by typing

   $(vGrafFarve4)

This variable contains the color code: ARGB(255,141,170,203)

But if I want the color value to be dynamic, so instead of typing color 4 in the statement above, I want to call a numeric value, which I get from this statement:

   =FieldIndex('Fakultet', 'Humaniora') --> 4

How do I do that`?

I tried something like:

   =$(vGrafFarve&FieldIndex('Fakultet', 'Humaniora'))

and

  ='$(vGrafFarve'&FieldIndex('Fakultet', 'Humaniora')'&')'

But none of it works.

Kind Regards

Maria

5 Replies
lironbaram
Partner - Master III
Partner - Master III

you can try

something like

$(='vGrafFarve'&FieldIndex('Fakultet', 'Humaniora'))

Anonymous
Not applicable
Author

Thanks for the answer!

This gives me almost what I want.

It gives me an argb color code, but not the right one.

I get the color code argb(600,128,64,0), but I need it to be argb(255,128,64,0) which the predefined variable $(vGrafFarve4) contains.

I double checked that the statement =FieldIndex('Fakultet','Humaniora') gives me the number 4.

Any ideas why I don't get the right color code?

lironbaram
Partner - Master III
Partner - Master III

hi

try to put this expression in text box

='vGrafFarve'&FieldIndex('Fakultet', 'Humaniora')

what is the result

Anonymous
Not applicable
Author

This gives me the text vGrafFarve4

lironbaram
Partner - Master III
Partner - Master III

hi

i have no idea , i tried it in my side and it seems to work well

can you share a sample app with the issue