The following example Rule script enables you to display an exclamation point next to the first statistic in each cell if that statistic is over 80. You can specify the number on the first line of the code.
To apply this Rule in Displayr, see How to Create a Custom Rule.
To apply this Rule in Q, see How to Create a Custom Rule.
Code
// Display an exclamation point next to the first statistic in each cell, if it is over 80.
let cutoff = 80;
// Get the values for the first statistic shown on the table.
var values = table.get(table.statistics[0]);
// Get the default text in each cell in the table.
var cell_texts = table.cellText;
// Loop through each cell...
for (var row = 0; row < table.numberRows; row++)
for (var column = 0; column < table.numberColumns; column++) {
var value = values[row][column];
if (value > cutoff) {
// Put an exclamation point next to the first statistic.
cell_texts[row][column] = ['!'];
}
}
// Now store the new cell texts.
table.cellText = cell_texts;