18
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.

mvp_badge
MVP
Rank: #42
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.

Rank: #70

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

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

mvp_badge
MVP
Rank: #42
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.

Rank: #295

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