I love the ability to change column names in an SQL Dashboard, but would like to be able to take it further and highlight rows with specific values, such as “error” or “warning”
Maybe even highlighting works with int values within a range
Would anyone else see benefit from this or am I on my own here?
You can highlight columns depending on their value by making use of the custom template option (click “edit” next to the column in the grid columns panel). This field accepts a mustache (which Squared Up have quite a bit of documentation and videos on), which can include an If test and then inject HTML into the result. As an example:
{{#if value == “error”}}<strong>{{value}}</strong>{{else}}{{value}}{{/if}}
Will emphasise (bold) the text if it matches error. You can use any Javascript methods here, so you can do regexes, replacements etc, and likewise any styling you can think up via HTML tags and CSS.
Disclaimer: That said, if you ask Squared Up support they will point out that whilst custom HTML/CSS works, it’s not guaranteed to work in the future as anything you do might conflict with future table or style changes to Squared Up itself. So use this trick at your discretion, and be prepared to update it in the future if they make changes to the product.