<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Color cells in Discussions</title>
    <link>https://community.jmp.com/t5/Discussions/Color-cells/m-p/693343#M87869</link>
    <description>&lt;P&gt;If by graying-out you mean changing the cell color, easiest options are most likely script based. One option is using &amp;lt;&amp;lt; Get Rows Where to get the rows which you want to color and then using &amp;lt;&amp;lt; Color Cells to set the color to those rows&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;Names Default To Here(1);

dt = Current Data Table();

For Each({colname}, dt &amp;lt;&amp;lt; Get Column Names("String"),
	rows_to_color = dt &amp;lt;&amp;lt; Get Rows Where(Is Missing(Column(dt, colname)[]));
	Column(dt, colname) &amp;lt;&amp;lt; Color Cells("Gray", rows_to_color);
	dt &amp;lt;&amp;lt; Clear Select;
);
&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="jthi_0-1698905312308.png" style="width: 400px;"&gt;&lt;img src="https://community.jmp.com/t5/image/serverpage/image-id/58244i4C56DC10D6A64BDA/image-size/medium?v=v2&amp;amp;px=400" role="button" title="jthi_0-1698905312308.png" alt="jthi_0-1698905312308.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Thu, 02 Nov 2023 06:09:04 GMT</pubDate>
    <dc:creator>jthi</dc:creator>
    <dc:date>2023-11-02T06:09:04Z</dc:date>
    <item>
      <title>Color cells</title>
      <link>https://community.jmp.com/t5/Discussions/Color-cells/m-p/693151#M87857</link>
      <description>&lt;P&gt;Hi,&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;How I can gray-out empty or with dots cells?&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="LargeCanary830_0-1698870672818.png" style="width: 400px;"&gt;&lt;img src="https://community.jmp.com/t5/image/serverpage/image-id/58234i33824785364BDA57/image-size/medium?v=v2&amp;amp;px=400" role="button" title="LargeCanary830_0-1698870672818.png" alt="LargeCanary830_0-1698870672818.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;I have version 16.1.&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;</description>
      <pubDate>Wed, 01 Nov 2023 20:33:08 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Color-cells/m-p/693151#M87857</guid>
      <dc:creator>LargeCanary830</dc:creator>
      <dc:date>2023-11-01T20:33:08Z</dc:date>
    </item>
    <item>
      <title>Re: Color cells</title>
      <link>https://community.jmp.com/t5/Discussions/Color-cells/m-p/693173#M87859</link>
      <description>&lt;P&gt;If you want it done to each column, you could use this script.&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;For Each( {col}, dt &amp;lt;&amp;lt; Get Column Names( "String" ),
	Eval(
		Eval Expr(
			dt &amp;lt;&amp;lt; Select Where( Is Missing( As Column( Expr( col ) ) ) );
			Expr( Column( col ) ) &amp;lt;&amp;lt; Color Cells( "gray" );
			dt &amp;lt;&amp;lt; Clear Select;
		)
	)
);&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;*edit&lt;/P&gt;&lt;P&gt;The Expr() and all that are completely unnecessary.&amp;nbsp; &lt;a href="https://community.jmp.com/t5/user/viewprofilepage/user-id/14366"&gt;@jthi&lt;/a&gt;&amp;nbsp;pointed that out with his example.&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;For Each( {col}, dt &amp;lt;&amp;lt; Get Column Names( "String" ),
	dt &amp;lt;&amp;lt; Select Where( Is Missing( As Column( col ) ) );
	Column( col ) &amp;lt;&amp;lt; Color Cells( "gray" );
	dt &amp;lt;&amp;lt; Clear Select;
);&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 02 Nov 2023 11:01:01 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Color-cells/m-p/693173#M87859</guid>
      <dc:creator>mmarchandTSI</dc:creator>
      <dc:date>2023-11-02T11:01:01Z</dc:date>
    </item>
    <item>
      <title>Re: Color cells</title>
      <link>https://community.jmp.com/t5/Discussions/Color-cells/m-p/693343#M87869</link>
      <description>&lt;P&gt;If by graying-out you mean changing the cell color, easiest options are most likely script based. One option is using &amp;lt;&amp;lt; Get Rows Where to get the rows which you want to color and then using &amp;lt;&amp;lt; Color Cells to set the color to those rows&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;Names Default To Here(1);

dt = Current Data Table();

For Each({colname}, dt &amp;lt;&amp;lt; Get Column Names("String"),
	rows_to_color = dt &amp;lt;&amp;lt; Get Rows Where(Is Missing(Column(dt, colname)[]));
	Column(dt, colname) &amp;lt;&amp;lt; Color Cells("Gray", rows_to_color);
	dt &amp;lt;&amp;lt; Clear Select;
);
&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="jthi_0-1698905312308.png" style="width: 400px;"&gt;&lt;img src="https://community.jmp.com/t5/image/serverpage/image-id/58244i4C56DC10D6A64BDA/image-size/medium?v=v2&amp;amp;px=400" role="button" title="jthi_0-1698905312308.png" alt="jthi_0-1698905312308.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 02 Nov 2023 06:09:04 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Color-cells/m-p/693343#M87869</guid>
      <dc:creator>jthi</dc:creator>
      <dc:date>2023-11-02T06:09:04Z</dc:date>
    </item>
    <item>
      <title>Re: Color cells</title>
      <link>https://community.jmp.com/t5/Discussions/Color-cells/m-p/693489#M87880</link>
      <description>&lt;P&gt;&lt;a href="https://community.jmp.com/t5/user/viewprofilepage/user-id/47878"&gt;@mmarchandTSI&lt;/a&gt;&amp;nbsp;you might also want to add check that some rows are selected (&amp;lt;&amp;lt; Color Cells will otherwise color all the cells).&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;Names Default To Here(1);

dt = New Table("Untitled",
	Add Rows(3),
	Compress File When Saved(1),
	New Column("Column 1", Numeric, "Continuous", Format("Best", 12), Set Values([., ., 1])),
	New Column("Column 2", Numeric, "Continuous", Format("Best", 12), Set Values([., ., .])),
	New Column("Column 3", Numeric, "Continuous", Format("Best", 12), Set Values([2, 3, 4]))
);

For Each({col}, dt &amp;lt;&amp;lt; Get Column Names("String"),
	dt &amp;lt;&amp;lt; Select Where(Is Missing(As Column(col)));
	Column(col) &amp;lt;&amp;lt; Color Cells("gray");
	dt &amp;lt;&amp;lt; Clear Select;
);
/*
For Each({col}, dt &amp;lt;&amp;lt; Get Column Names("String"),
	dt &amp;lt;&amp;lt; Select Where(Is Missing(As Column(col)));
	If(N Items(dt &amp;lt;&amp;lt; Get Selected Rows) &amp;gt; 0,
		Column(col) &amp;lt;&amp;lt; Color Cells("gray");
	);
	dt &amp;lt;&amp;lt; Clear Select;
);
*/&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Thu, 02 Nov 2023 11:06:09 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Color-cells/m-p/693489#M87880</guid>
      <dc:creator>jthi</dc:creator>
      <dc:date>2023-11-02T11:06:09Z</dc:date>
    </item>
    <item>
      <title>Re: Color cells</title>
      <link>https://community.jmp.com/t5/Discussions/Color-cells/m-p/693492#M87881</link>
      <description>&lt;P&gt;Should be okay, because &amp;lt;&amp;lt;Select Where only adds to the current selection when the "extend" option is specified.&amp;nbsp; Default is to select only rows that satisfy the conditions.&amp;nbsp; Could amend the &amp;lt;&amp;lt;Select Where to be safe.&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;dt &amp;lt;&amp;lt; Select Where( Is Missing( As Column( col ) ), current selection( "clear" ) )&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Thu, 02 Nov 2023 11:22:48 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Color-cells/m-p/693492#M87881</guid>
      <dc:creator>mmarchandTSI</dc:creator>
      <dc:date>2023-11-02T11:22:48Z</dc:date>
    </item>
    <item>
      <title>Re: Color cells</title>
      <link>https://community.jmp.com/t5/Discussions/Color-cells/m-p/693498#M87882</link>
      <description>&lt;P&gt;Hi Jarmo,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Where can I add this option? sorry I'm new using JMP software.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 02 Nov 2023 12:20:03 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Color-cells/m-p/693498#M87882</guid>
      <dc:creator>LargeCanary830</dc:creator>
      <dc:date>2023-11-02T12:20:03Z</dc:date>
    </item>
    <item>
      <title>Re: Color cells</title>
      <link>https://community.jmp.com/t5/Discussions/Color-cells/m-p/693499#M87883</link>
      <description>&lt;P&gt;What I meant is that if there are no rows selected at all, all the cells in that column will be colored.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;In this case all the cells in Age will get colored because there are no rows selected&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;Names Default To Here(1);

dt = Open("$SAMPLE_DATA/Big Class.jmp");
wait(1);

:Age &amp;lt;&amp;lt; Color Cells("Red");
wait(1);

dt &amp;lt;&amp;lt; Select Rows([2,4,6,20]);
:Name &amp;lt;&amp;lt; Color Cells("Blue");
dt &amp;lt;&amp;lt; Clear Select;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="jthi_0-1698927597379.png" style="width: 400px;"&gt;&lt;img src="https://community.jmp.com/t5/image/serverpage/image-id/58252iEBD586A867C662F0/image-size/medium?v=v2&amp;amp;px=400" role="button" title="jthi_0-1698927597379.png" alt="jthi_0-1698927597379.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 02 Nov 2023 12:20:53 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Color-cells/m-p/693499#M87883</guid>
      <dc:creator>jthi</dc:creator>
      <dc:date>2023-11-02T12:20:53Z</dc:date>
    </item>
    <item>
      <title>Re: Color cells</title>
      <link>https://community.jmp.com/t5/Discussions/Color-cells/m-p/693504#M87884</link>
      <description>&lt;P&gt;Yes, good point.&lt;/P&gt;</description>
      <pubDate>Thu, 02 Nov 2023 12:24:23 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Color-cells/m-p/693504#M87884</guid>
      <dc:creator>mmarchandTSI</dc:creator>
      <dc:date>2023-11-02T12:24:23Z</dc:date>
    </item>
    <item>
      <title>Re: Color cells</title>
      <link>https://community.jmp.com/t5/Discussions/Color-cells/m-p/693511#M87885</link>
      <description>&lt;P&gt;Depending on how this will be used, there are few options. Simplest option and what will get you going is to open new script file from File menu&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="jthi_0-1698928278797.png" style="width: 400px;"&gt;&lt;img src="https://community.jmp.com/t5/image/serverpage/image-id/58253iB97387541FECE8AA/image-size/medium?v=v2&amp;amp;px=400" role="button" title="jthi_0-1698928278797.png" alt="jthi_0-1698928278797.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;Then copy paste the script to that window which will open&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="jthi_1-1698928311292.png" style="width: 400px;"&gt;&lt;img src="https://community.jmp.com/t5/image/serverpage/image-id/58254i556821A6A65304AD/image-size/medium?v=v2&amp;amp;px=400" role="button" title="jthi_1-1698928311292.png" alt="jthi_1-1698928311292.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;Check that you have correct table from the top "toolbar" (it should be if it was last active when you did open the new script file).&lt;/P&gt;
&lt;P&gt;Then Press Run Script from the toolbar&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="jthi_2-1698928352209.png" style="width: 400px;"&gt;&lt;img src="https://community.jmp.com/t5/image/serverpage/image-id/58255i928CDADCAE52C8A5/image-size/medium?v=v2&amp;amp;px=400" role="button" title="jthi_2-1698928352209.png" alt="jthi_2-1698928352209.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If this must be done repeatedly, you could make that script into a toolbar item, add-in, table script, script file... depending on the use&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 02 Nov 2023 12:33:06 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Color-cells/m-p/693511#M87885</guid>
      <dc:creator>jthi</dc:creator>
      <dc:date>2023-11-02T12:33:06Z</dc:date>
    </item>
    <item>
      <title>Re: Color cells</title>
      <link>https://community.jmp.com/t5/Discussions/Color-cells/m-p/693527#M87888</link>
      <description>&lt;P&gt;Perfect! Thank you for your help. I really appreciate it.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 02 Nov 2023 13:18:07 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Color-cells/m-p/693527#M87888</guid>
      <dc:creator>LargeCanary830</dc:creator>
      <dc:date>2023-11-02T13:18:07Z</dc:date>
    </item>
  </channel>
</rss>

