JMP Scripting Coloring Cells Based on a CriteriaHi - Can someone please tell me how I would go about coloring a cell that is not equal to 1 in the summary sheet below using JMP Scripting, starting with the N Categories (Process Taxonomy Level 1) column? Also, these are just sample columns, there are 40 other columns so I don't want to specify the actual column names in the script. Lastly, If a cell is colored in the summary table, can the color be applied to the original data table, to which the summary table is linked?

Data TableScriptingRe: JMP Scripting Coloring Cells Based on a CriteriaThank you so much!
Re: JMP Scripting Coloring Cells Based on a Criteria- Read the documents, Discovering JMP and Using JMP. Both documents are in the JMP Documentation Library available under the Help pull down menu.
- To add an indicator column
- Create a new column in both the original data table, and in the summary data table. Call the column "Flag" or "Indicator" etc.
- Add to the script, as the last 2 lines in the For() loop
dt:Flag[dt << get selected rows]=1;
dtSum:Flag[dtSum << get selected rows]=1;
- Take the time to study the script to make sure you understand it.
Re: JMP Scripting Coloring Cells Based on a CriteriaThank you so much! It worked.
As a follow up question, if I wanted to create an indicator column with a 1 to mark any row with a highlighted cell in the data table, how can I do that?
Re: JMP Scripting Coloring Cells Based on a CriteriaHere is one way to handle the issue:

Names Default To Here( 1 );
// Open Data Table: big class.jmp
// → Data Table( "big class" )
dt = Open( "$SAMPLE_DATA/big class.jmp" );
dtSum = dt << Summary(
Group( :age ),
Mean( :height ),
Mean( :weight ),
Freq( "None" ),
Weight( "None" ),
statistics column name format( "column" )
);
// Get the column names of the current columns
sumColNames = dtSum << get column names(string);
// Remove the first 2 columns from the list
remove from( sumColNames, 1, 2 );
// loop across columns finding all cells > 63
For( i=1, i<= N Items( sumColNames ), i++,
// select all rows where cells are above 63
dtSum << select where( as column( dtSum, sumColNames[i]) > 63 );
// Color cells in summary table
as column(dtSum, sumColNames[i]) << Color Cells( red, dtSum << get selected rows );
// Color cells in original table
as column(dt, sumColNames[i]) << Color Cells( red, dt << get selected rows );
)