Cell Styling Widget for Datagrid

Hi everyone, I am trying to add some cell styling to my data grid based on a few conditions. I want the due date text to turn red when the due date attribute is less than today’s current date AND if the status (another attribute in the data grid) does not equal ‘completed’ or ‘retired’. What would the code be for this? I am mostly stuck on the due date part of the expression. I have used this cell styler in the past for very simple formatting but I am not very familiar with javascript. Also, please do not suggest using data grid 2 as this is not an option for this project. Thank you!
2 answers


A couple of suggestions.  For the column name, you need the attribute name, see this screenshot from the documentation:

Also, it may be more straightforward to use a nanoflow, have you tried that?



Like Mike said I would maybe use a nanoflow for this.


In the nanoflow you can check if your object meets the criteria.

Create a nanoflow and add a decision → $object/status != EnumValue AND $ocject/dueDate < [%CurrentDateTime%] → if this criteria is met return true.


Think this would be easier than JavaScript and I hope it works.