Home › Forums › KX Solutions › KX Dashboards Conditional Highlight on Text › Reply To: KX Dashboards Conditional Highlight on Text
-
If the data source looks like:
([] kkey: enlist`message; vvalue: 1?("ERROR: Missing Data"; "WARNING: Last load 2024.08.12";"Data up to date"))
I can use this template (with handlebars helper “occurrences”)
{{#if (occurrences this.0.vvalue "ERROR")}} <span style="color: red">{{this.0.vvalue}}</span> {{else}} {{#if (occurrences this.0.vvalue "WARNING")}} <span style="color: orange">{{this.0.vvalue}}</span> {{else}} {{this.0.vvalue}} {{/if}} {{/if}}
In this case, query mapping is not necessary.
Sorry for the code formatting.., unpack the zip file and import the xml into your environment for the demo.