<?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: How to change Col Value in selected row? in Discussions</title>
    <link>https://community.jmp.com/t5/Discussions/How-to-change-Col-Value-in-selected-row/m-p/333072#M58131</link>
    <description>&lt;P&gt;I have annotated my JSL as to what is the correct JSL to do what you are looking to do&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;names default to here(1);
dt = Open( "$SAMPLE_DATA/Big Class.jmp" );

// The sort is not required for the Select duplicate rows to work
// The 2 sorts you specified, first sorted all of the rows by age and
// then sorted all of the rows by height.  I think what you were looking
// to do, was to sort all of the heights within each age group.  That
// would be accomplished with the line of code below 
dt &amp;lt;&amp;lt; Sort( replace table, by( Column(  2 ),Column(  4 ) ), Order( Ascending, Ascending ) );

dt &amp;lt;&amp;lt; Select duplicate rows( Match( Column( dt, 2 ), Column( dt, 3 ), Column( dt, 4 ) ) );

aa = dt &amp;lt;&amp;lt;get selected rows;

If( N Rows( aa ) &amp;gt; 0,
	// All you need is a simple assignment statement setting all of the rows found for the column
	// age equal to 9999
	(Column(dt,2)[aa]) = 9999;
);&lt;/CODE&gt;&lt;/PRE&gt;</description>
    <pubDate>Fri, 13 Nov 2020 02:07:01 GMT</pubDate>
    <dc:creator>txnelson</dc:creator>
    <dc:date>2020-11-13T02:07:01Z</dc:date>
    <item>
      <title>How to change Col Value in selected row?</title>
      <link>https://community.jmp.com/t5/Discussions/How-to-change-Col-Value-in-selected-row/m-p/333037#M58129</link>
      <description>&lt;P&gt;Hi, everyone.&lt;/P&gt;&lt;P&gt;I want to change Col value in only selected row using JSL.&lt;/P&gt;&lt;P&gt;(ex, second Col value : 14 -&amp;gt; 9999)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Can I get some advice?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;dt = Open( "$SAMPLE_DATA/Big Class.jmp" );
Current Data Table() &amp;lt;&amp;lt; Sort( replace table, Column( address, 2 ), Order( Ascending ) );
Current Data Table() &amp;lt;&amp;lt; Sort( replace table, Column( address, 4 ), Order( Ascending ) );
//wait(1);
dt &amp;lt;&amp;lt; Select duplicate rows( Match( Column(dt, 2), Column(dt, 3 ), Column(dt, 4 ) ) );&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I can't complete it...&lt;/P&gt;&lt;P&gt;Please help me.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 09 Jun 2023 23:43:05 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/How-to-change-Col-Value-in-selected-row/m-p/333037#M58129</guid>
      <dc:creator>LBrian</dc:creator>
      <dc:date>2023-06-09T23:43:05Z</dc:date>
    </item>
    <item>
      <title>Re: How to change Col Value in selected row?</title>
      <link>https://community.jmp.com/t5/Discussions/How-to-change-Col-Value-in-selected-row/m-p/333061#M58130</link>
      <description>&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;dt = Open( "$SAMPLE_DATA/Big Class.jmp" );
Current Data Table() &amp;lt;&amp;lt; Sort( replace table, Column( address, 2 ), Order( Ascending ) );
Current Data Table() &amp;lt;&amp;lt; Sort( replace table, Column( address, 4 ), Order( Ascending ) );
//wait(1);
dt &amp;lt;&amp;lt; Select duplicate rows( Match( Column( dt, 2 ), Column( dt, 3 ), Column( dt, 4 ) ) );

aa = dt &amp;lt;&amp;lt;get selected rows;

If( N Rows( aa ) &amp;gt; 0,
	Column(dt,2) &amp;lt;&amp;lt; Set Values("9999");
);
	&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;I don't know why it doesn't work.&lt;/P&gt;</description>
      <pubDate>Fri, 13 Nov 2020 01:38:45 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/How-to-change-Col-Value-in-selected-row/m-p/333061#M58130</guid>
      <dc:creator>LBrian</dc:creator>
      <dc:date>2020-11-13T01:38:45Z</dc:date>
    </item>
    <item>
      <title>Re: How to change Col Value in selected row?</title>
      <link>https://community.jmp.com/t5/Discussions/How-to-change-Col-Value-in-selected-row/m-p/333072#M58131</link>
      <description>&lt;P&gt;I have annotated my JSL as to what is the correct JSL to do what you are looking to do&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;names default to here(1);
dt = Open( "$SAMPLE_DATA/Big Class.jmp" );

// The sort is not required for the Select duplicate rows to work
// The 2 sorts you specified, first sorted all of the rows by age and
// then sorted all of the rows by height.  I think what you were looking
// to do, was to sort all of the heights within each age group.  That
// would be accomplished with the line of code below 
dt &amp;lt;&amp;lt; Sort( replace table, by( Column(  2 ),Column(  4 ) ), Order( Ascending, Ascending ) );

dt &amp;lt;&amp;lt; Select duplicate rows( Match( Column( dt, 2 ), Column( dt, 3 ), Column( dt, 4 ) ) );

aa = dt &amp;lt;&amp;lt;get selected rows;

If( N Rows( aa ) &amp;gt; 0,
	// All you need is a simple assignment statement setting all of the rows found for the column
	// age equal to 9999
	(Column(dt,2)[aa]) = 9999;
);&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Fri, 13 Nov 2020 02:07:01 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/How-to-change-Col-Value-in-selected-row/m-p/333072#M58131</guid>
      <dc:creator>txnelson</dc:creator>
      <dc:date>2020-11-13T02:07:01Z</dc:date>
    </item>
    <item>
      <title>Re: How to change Col Value in selected row?</title>
      <link>https://community.jmp.com/t5/Discussions/How-to-change-Col-Value-in-selected-row/m-p/333073#M58132</link>
      <description>Thank you, very much!!!</description>
      <pubDate>Fri, 13 Nov 2020 02:11:00 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/How-to-change-Col-Value-in-selected-row/m-p/333073#M58132</guid>
      <dc:creator>LBrian</dc:creator>
      <dc:date>2020-11-13T02:11:00Z</dc:date>
    </item>
  </channel>
</rss>

