Colour widget according to return value

0
Hello, I would like to change the colour of a field on the Mendix dashboard depending on a returned microflow value, with which widget can I do this and how? Could not find anything about thisHello, I would like to change the colour of a field on the Mendix dashboard depending on a returned microflow value, with which widget can I do this and how? Could not find anything about this
asked
2 answers
0

You have to insert in dynamic class.

Let me show you, first i create classs

then im going to the page that i want to adjust in my case it is test page

 

when you double click on example text, you will have ‘edit text’ window, then go to appearance and dynamic classes:

 

 

and voila

 

 

answered
0

You can use the dynamic class for this, create two css classes beforehand so that you can change the colour of the background. For example: 
 

.red-background { background-color: red; }

.green-background { background-color: green; }

 

if
    $currentObject/YOUROBJECT = ‘yourvalue’
then
    'green-background'
else if $currentObject/YOUROBJECT = ‘yourvalue2’
then
    'red-background'
else 
    ’’

answered