Showing image in table depending on boolean

0
Hi, I would like to show for example a red flag in a table when the object is false and a green flag when the object is true. How can I do this? I got a table with a column 'available' which is the boolean but i can't adjust this in the properties.
asked
3 answers
3

Use an enumeration instead of a boolean. You can define an image for each value of the enumeration.

answered
1

Hi Lennart,

Can you add both images to your table and then use conditonal visbility based on the available boolean?

answered
0

Hi guys!

Thanks for the tip! To get the devices images in the table the enumeration worked perfectly! to get the flags into the table depending on the booleon I used custom css:

flags{

background-image: url(../../../img/greenflag.png);

background-size: contain;

margin-left:auto;

margin-right:auto;

display: block;

background-repeat: no-repeat;

background-position: center;

}

And a custom widget, thanks!

answered