cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Submit your abstract to the call for content for Discovery Summit Americas by April 23. Selected abstracts will be presented at Discovery Summit, Oct. 21- 24.
Discovery is online this week, April 16 and 18. Join us for these exciting interactive sessions.
Choose Language Hide Translation Bar
UberBock
Level III

Selection and coloring cells

So if I use:

dt = currentDataTable();
dt << select where(:RESULTNAME != "Success");
dt:RESULTNAME << color cells(RGB Color( 255, 150, 150 ));
dt << clear select();

 

When the data table has only 'Success' all cells are colored.  If the table has 1 value that is not 'Success' then it colors that cell and only that cell.  Anyway to have it not color all the cells when it only has 'Success'

1 ACCEPTED SOLUTION

Accepted Solutions
txnelson
Super User

Re: Selection and coloring cells

Try using this method

names default to here(1);
dt=open("$SAMPLE_DATA/big class.jmp");
dt<<select where(:age==12);

dt:age<<color cells("red", dt<<get selected rows);
Jim

View solution in original post

3 REPLIES 3
txnelson
Super User

Re: Selection and coloring cells

Try using this method

names default to here(1);
dt=open("$SAMPLE_DATA/big class.jmp");
dt<<select where(:age==12);

dt:age<<color cells("red", dt<<get selected rows);
Jim
UberBock
Level III

Re: Selection and coloring cells

Thanks again!
pmroz
Super User

Re: Selection and coloring cells

You can also use get rows where:

dt = currentDataTable();
match_rows = dt << get rows where(:RESULTNAME != "Success");
dt:RESULTNAME << color cells(RGB Color( 255, 150, 150 ), match_rows);