<?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: Select and color rows in Discussions</title>
    <link>https://community.jmp.com/t5/Discussions/Select-and-color-rows/m-p/51916#M29452</link>
    <description>&lt;P&gt;Try this:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;dt10 = Open( "\\Test\Table1.jmp" );

dt11 = dt10 &amp;lt;&amp;lt; Summary( Group( :Work Week ), Freq( "None" ), Weight( "None" ) );

x = N Row( dt11 );
v = N Rows( dt10 );

For( i = 1, i &amp;lt;= x, i++,
	dt11 &amp;lt;&amp;lt; Select Rows( i );
	dt10:Work Week &amp;lt;&amp;lt; color cells( "Red")	
	dt11 &amp;lt;&amp;lt; clear selection();
);&lt;/CODE&gt;&lt;/PRE&gt;</description>
    <pubDate>Thu, 22 Feb 2018 22:30:13 GMT</pubDate>
    <dc:creator>txnelson</dc:creator>
    <dc:date>2018-02-22T22:30:13Z</dc:date>
    <item>
      <title>Select and color rows</title>
      <link>https://community.jmp.com/t5/Discussions/Select-and-color-rows/m-p/51912#M29448</link>
      <description>&lt;P&gt;Hi I am writing the following code to achieve the following. Could anyone please help. For some reason the code is not working.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks Joydeep&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Objective.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I am opening Table 1, Then getting summary&amp;nbsp;of Table 1 and save it to table 2.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Now for each row in the Table 2, I want to color the rows of Table 1.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;So I am running For loop in Table to select each row and based on that trying to color the row of Table 1.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I would appreciate your help.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;//// Here is the code I am trying
 
 
dt10= open("\\Test\Table1.jmp");
 
dt11= dt10 &amp;lt;&amp;lt; Summary(
Group(:Work Week ),
Freq( "None" ),
Weight( "None" )
);
x= N Row(dt11);
v= N Rows(dt10);
For(i=1,i &amp;lt;=x, i++,
dt11 &amp;lt;&amp;lt; Select Rows(i) ;

For (j=1,j&amp;lt;=v, j++, dt10 &amp;lt;&amp;lt; current data table();

if ( Row State(dt10,j) == "Selected" , Column( dt10, "Work Week") &amp;lt;&amp;lt; Color Cells( i,{j} ));


);
dt11 &amp;lt;&amp;lt; clear selection();
);&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 22 Feb 2018 22:20:34 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Select-and-color-rows/m-p/51912#M29448</guid>
      <dc:creator>joydeepb83</dc:creator>
      <dc:date>2018-02-22T22:20:34Z</dc:date>
    </item>
    <item>
      <title>Re: Select and color rows</title>
      <link>https://community.jmp.com/t5/Discussions/Select-and-color-rows/m-p/51916#M29452</link>
      <description>&lt;P&gt;Try this:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;dt10 = Open( "\\Test\Table1.jmp" );

dt11 = dt10 &amp;lt;&amp;lt; Summary( Group( :Work Week ), Freq( "None" ), Weight( "None" ) );

x = N Row( dt11 );
v = N Rows( dt10 );

For( i = 1, i &amp;lt;= x, i++,
	dt11 &amp;lt;&amp;lt; Select Rows( i );
	dt10:Work Week &amp;lt;&amp;lt; color cells( "Red")	
	dt11 &amp;lt;&amp;lt; clear selection();
);&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Thu, 22 Feb 2018 22:30:13 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Select-and-color-rows/m-p/51916#M29452</guid>
      <dc:creator>txnelson</dc:creator>
      <dc:date>2018-02-22T22:30:13Z</dc:date>
    </item>
  </channel>
</rss>

