Color cells by specific conditionHi,
I'm new for JSL.
I want the cell to change color based on specific condition.
for example, I want :dIGSS>5 get red color.
dt << Get Rows Where(:dIGSS>5);
:dIGSS << Color Cells(3);
But all dIGSS rows change to red.
I've found an example which can change cell's color based on specific condition, but it is for each column:
For Each({colname}, dt << Get Column Names("String"),
rows_to_color = dt << Get Rows Where((Column(dt, colname)[]>5));
Column(dt, colname) << Color Cells("Red", rows_to_color);
);How can I do?
I have version 17.
Thanks.
WindowsRe: Color cells by specific conditionExamining the issue, using the Scripting Index, there does not seem to be any "Color Cells" syntax that permits the coloring of cells for more than one column using JSL. There is a syntax for "Color Cells" that is used in conjunction with the Identifying of Outliers platform.
Therefore, the sample JSL you listed is the only method I know of to color the cells as you want.
Re: Color cells by specific conditionThanks! This is exactly what I need.
Re: Color cells by specific conditionThank you for answering, you made my day 
Re: Color cells by specific conditionYou can provide Color Cells with list of rows numbers (or matrix) and you can then use that (basically remove loop from your second example)
rows_to_color = dt << Get Rows Where(:dIGSS > 5));
:dIGSS << Color Cells("Red", rows_to_color);
See example 2 (and 3 if you need multiple colors) from Scripting Index for Color Cells

Edit:
Corrected text "You can provide Color Cells with list of columns" to "You can provide Color Cells with list of row numbers"