340
Views
4
Comments
Solved
Can I save a color into the database?
Question

Hi everyone.

I have an entity (static entity, to be precise) that needs to have a color attribute. Is there a way to do this? Like, without using a literal string that says "red", "yellow" or something like that?


Thanks in advance.

2019-06-15 21-39-22
Afonso Carvalho
 
MVP
Solution

Hi Yizuhi,

Could you share the purpose of your static entity? Are you planning on using this color attribute to affect your UI?

You could create a text column in your Static Entity and store the hex code of your color. This way, you could apply it to elements in your screen.

2018-10-29 08-31-03
João Marques
 
MVP

Hi Yizuhi,


Yes you can. You just have to add a new attribute to the static entity like this:



And then you just have to fill the values for each record, something like this:


Hope it helps.


Cheers,
João

2020-04-15 19-07-26
Eduardo Rodrigues

Hi Yuzuhi,

You can use the static color table of OutsystyemsUI.

And put an attribute of type ColorId in your static entity. However, the ideal is to create your own static entity with the colors you intend to use.

Best regards,

Eduardo Rodrigues

2019-06-15 21-39-22
Afonso Carvalho
 
MVP
Solution

Hi Yizuhi,

Could you share the purpose of your static entity? Are you planning on using this color attribute to affect your UI?

You could create a text column in your Static Entity and store the hex code of your color. This way, you could apply it to elements in your screen.

2022-10-17 06-51-09
Shweta Gedam

Hi, 

You can directly create a static entity attribute as Color and then passing value for color in each record like red etc as joao said. Hope this is what you want. 

Thank you! Happy coding

Community GuidelinesBe kind and respectful, give credit to the original source of content, and search for duplicates before posting.