Icon with the table-data based on condition

Hi
I need to display an icon in front of the data based on some condition, is it possible somehow in CUBA technologies? I know it’s possible to put them in a separate column but the need is to be in the same column.

image

Thanks for your suggestions.

Hi @mortozakhan

The only possible way is to use generated columns

Regards,
Daniil

Hi
Sounds good. Would you please share a code snippets inside generated column how to get the icon and data in a column ?

Just create horizontal box layout and add two labels inside of it to get the following layout:

<hbox spacing="true">
    <label icon="ARROW_UP"/>
    <label value="+0.2%"/>
</hbox>

Result:

image

Regards,
Daniil

Hi Daniil
Thanks but I want to populate the table from data source and the icon will be based on the value/condition! Any further thoughts?

regards
Mortoza

The snippet above is just an example of resulting layout - you should generate it in table column generator considering data and conditions.

Regards,
Daniil