JavaScript Snippet (Data Source) not showing boolean values

0
Hi, I am trying to change the background color of a certain item in listview based on a certain attribute value (boolean) using the JavaScript Snippet (Data source) add-on. When I go to select an attribute, this is what shows up.  Here is my domain model: As you can see, none of the boolean attributes are showing up in the widget. Does anyone have an explanation for this? Mendix Studio Version: 9.14.1
asked
1 answers
6

Hi Andrew Bernhardt,

In java script snippet, data source is used to put string in between the java script code.

For your requirement , you can use dynamic class like

if $currentObject/boolean
then 'class1' else 'class2'

You can add styles to class1 and class2 with your color.

Hope this helps!

answered