Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
gavin_kite
Partner - Contributor III
Partner - Contributor III

Assigning a Colour to a dimension via the load script

Hi Guys

This feels really basic but I'm struggling to assign a colour to a dimension

I've added the RGB value that I want to use for each Requirement Part ID

SS1.png

And need to colour the 'Requirement Part ID'  with the RGB colour to the right

I have expanded the Requirement Part ID dimension and in the Background Colour field have tried loads of different thing already suggested on here and none of them seem to work unless you only have one Requirement Part ID value selected. I would like it to show the RGB colour if a Requirement Part ID is selected or not


Things already tried:

  • =$(=only(PartColour))
  • =$(=$(=PartColour))
  • =PartColour
  • PartColour

I've also tried all of the above as a variable.


You can see it is working fine when only a single Requirement Part ID is selected. This is using =$(=$(=PartColour)) but as soon as the Requirement Part ID selection is removed, I lose the colour

ss2.png


Any ideas on what else I could try?


Thanks


1 Solution

Accepted Solutions
sunny_talwar

Instead of storing the whole thing, store it as three fields.... R, G, B and then use this

RGB(R, G, B) as the expression for Dimension color and see if that works

View solution in original post

4 Replies
gavin_kite
Partner - Contributor III
Partner - Contributor III
Author

Thanks for your response but that seems to refer to setting colour by expression?

My code does work on the dimension but only when single value is selected

sunny_talwar

Instead of storing the whole thing, store it as three fields.... R, G, B and then use this

RGB(R, G, B) as the expression for Dimension color and see if that works

gavin_kite
Partner - Contributor III
Partner - Contributor III
Author

Worked a treat. Thank you