Subscribe Bookmark RSS Feed

How to keep Cell Color of JMP table when Concatenating Tables

billkopp

New Contributor

Joined:

Aug 23, 2016

In a JSL I have several tables with some cells colored. Is there an option that will preserve the custom colored cells in the concatenated table.

In this example, the colors in dtFTSplit1 are lost.

dtFTDetails << Concatenate( dtFTSplit1, append to first table )

Capture.GIF

1 ACCEPTED SOLUTION

Accepted Solutions
txnelson

Super User

Joined:

Jun 22, 2012

Solution

I am not aware of any option that allows the retaining of the cell colors during a concatenation.  In fact, just getting the cell colors is not a straight forward thing.  In the past, I have handled this by examining the script for a given table, and then interrigating the script to get the cell colors and then applying that to the correct columns in the new data table.

/**************************************************************************/
/* Get the color specified for a column                                   */
/*                                                                        */
/* There is not a direct way in JMP to get the color(s) that have been    */
/* specified for a given column.  However, one can ask JMP to provide     */
/* a script that will recreate a column, and within that script, the      */
/* color(s) can be found.                                                 */
/*                                                                        */
/* An Example Column's Script:                                            */
/*                                                                        */
/*   New Column( "From",                                                  */
/*	 Numeric,                                                             */
/*	 Continuous,                                                          */
/*	 Format( "Best", 6 ),                                                 */
/*	 Value Labels( {9999 = "All Fail", 99999 = "All Fail",                */
/*     999999 = "All Fail"} ),                                            */
/*	 Use Value Labels( 1 ),                                               */
/*	 Color Cells( {5, {0}} ),                                             */
/*	 Set Values(                                                          */
/*		[1, 13.09, 12.4, 11.74, 614000000, 614000000, 614000000,          */
/*      614000000, 614000000, 614000000, 614000000, 614000000,            */ 
/*      614000000, 614000000, 614000000, 614000000, 614000000,            */
/*      614000000, 614000000, 614000000, 614000000, 614000000]            */
/*	    )                                                                 */
/*    )                                                                   */
/**************************************************************************/
Jim
3 REPLIES
txnelson

Super User

Joined:

Jun 22, 2012

Solution

I am not aware of any option that allows the retaining of the cell colors during a concatenation.  In fact, just getting the cell colors is not a straight forward thing.  In the past, I have handled this by examining the script for a given table, and then interrigating the script to get the cell colors and then applying that to the correct columns in the new data table.

/**************************************************************************/
/* Get the color specified for a column                                   */
/*                                                                        */
/* There is not a direct way in JMP to get the color(s) that have been    */
/* specified for a given column.  However, one can ask JMP to provide     */
/* a script that will recreate a column, and within that script, the      */
/* color(s) can be found.                                                 */
/*                                                                        */
/* An Example Column's Script:                                            */
/*                                                                        */
/*   New Column( "From",                                                  */
/*	 Numeric,                                                             */
/*	 Continuous,                                                          */
/*	 Format( "Best", 6 ),                                                 */
/*	 Value Labels( {9999 = "All Fail", 99999 = "All Fail",                */
/*     999999 = "All Fail"} ),                                            */
/*	 Use Value Labels( 1 ),                                               */
/*	 Color Cells( {5, {0}} ),                                             */
/*	 Set Values(                                                          */
/*		[1, 13.09, 12.4, 11.74, 614000000, 614000000, 614000000,          */
/*      614000000, 614000000, 614000000, 614000000, 614000000,            */ 
/*      614000000, 614000000, 614000000, 614000000, 614000000,            */
/*      614000000, 614000000, 614000000, 614000000, 614000000]            */
/*	    )                                                                 */
/*    )                                                                   */
/**************************************************************************/
Jim
billkopp

New Contributor

Joined:

Aug 23, 2016

Thanks Jim, good response. I think what you are saying is that if I have the script from whick the pre-concat script is available the colors can be determined. Yes, but if I have tables I wish to concatenate can I find the colors by interigating the table?

txnelson

Super User

Joined:

Jun 22, 2012

Bill,
Currently, the only way to find out the cell colors is to get the script from the data table you are going to concatenate and then interrogate the script to find out the cell color values. To do this, you just have to use the "Get Script" message.

Thescript = current data table() << Get Script;

Then you can interrogate the "Thescript" variable to get the cell colors. My illustration above show what the variable "Thescript" value will be.
Jim