<?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: Replace multiple rows value from one column is not working properly in Discussions</title>
    <link>https://community.jmp.com/t5/Discussions/Replace-multiple-rows-value-from-one-column-is-not-working/m-p/391002#M64114</link>
    <description>&lt;P&gt;Try closing the summary table before setting the values in the original table.&amp;nbsp; The Summary table is linked to the original and is keeping it from being updated.&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;dt_temp = data table("aaaa");

dt_summ = dt_temp &amp;lt;&amp;lt; Summary( Group( :Column1,:Column2), Freq( "None" ), Weight( "None" ),output table name( "summary" ) );
data table("summary") &amp;lt;&amp;lt; select where (:N rows &amp;gt;= 2 &amp;amp; !contains(:Column1,"AA") &amp;amp; !contains(:Column1,"BB") );
rows = dt_temp &amp;lt;&amp;lt; get selected rows; 
close( dt_summ, nosave );


dt_temp:Column3[rows] = "";
//Column(dt_temp, "Column3")[rows] = "";&lt;/CODE&gt;&lt;/PRE&gt;</description>
    <pubDate>Sat, 05 Jun 2021 17:09:37 GMT</pubDate>
    <dc:creator>txnelson</dc:creator>
    <dc:date>2021-06-05T17:09:37Z</dc:date>
    <item>
      <title>Replace multiple rows value from one column is not working properly</title>
      <link>https://community.jmp.com/t5/Discussions/Replace-multiple-rows-value-from-one-column-is-not-working/m-p/390325#M64045</link>
      <description>&lt;P&gt;Hi JMP community,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have occured one issue that quite weird. Here's my code:&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;dt_temp = data table("aaaa");

dt_temp &amp;lt;&amp;lt; Summary( Group( :Column1,:Column2), Freq( "None" ), Weight( "None" ),output table name( "summary" ) );
data table("summary") &amp;lt;&amp;lt; select where (:N rows &amp;gt;= 2 &amp;amp; !contains(:Column1,"AA") &amp;amp; !contains(:Column1,"BB") );
rows = dt_temp &amp;lt;&amp;lt; get selected rows; 

dt_temp:Column3[rows] = "";
//Column(dt_temp, "Column3")[rows] = "";

&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;When i run this code, even the rows has value like [10, 11, 20, 21] but the end result from column3 is different. It replace others row (let's say row 1, 5, ...) instead of rows in get selected rows.&amp;nbsp;&lt;/P&gt;&lt;P&gt;Could you help me to resolve this issue?&lt;/P&gt;</description>
      <pubDate>Fri, 09 Jun 2023 19:48:31 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Replace-multiple-rows-value-from-one-column-is-not-working/m-p/390325#M64045</guid>
      <dc:creator>nthai</dc:creator>
      <dc:date>2023-06-09T19:48:31Z</dc:date>
    </item>
    <item>
      <title>Re: Replace multiple rows value from one column is not working properly</title>
      <link>https://community.jmp.com/t5/Discussions/Replace-multiple-rows-value-from-one-column-is-not-working/m-p/390336#M64046</link>
      <description>&lt;P&gt;Are you trying to replace values in the original data table or in the summary table? This seems to work just fine for me:&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;Names Default To Here(1);
dt_temp = Open("$SAMPLE_DATA/Big Class.jmp");
dt_temp &amp;lt;&amp;lt; Summary(Group(:age, :sex), Freq("None"), Weight("None"), output table name( "summary" ));

data table("summary") &amp;lt;&amp;lt; Select Where(:N Rows &amp;gt;= 3 &amp;amp; !Contains(:sex, "M"));
rows = dt_temp &amp;lt;&amp;lt; Get Selected Rows;
show(dt_temp:name[rows]);
dt_temp:name[rows] = "";
show(dt_temp:name[rows]);&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Fri, 04 Jun 2021 04:45:59 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Replace-multiple-rows-value-from-one-column-is-not-working/m-p/390336#M64046</guid>
      <dc:creator>jthi</dc:creator>
      <dc:date>2021-06-04T04:45:59Z</dc:date>
    </item>
    <item>
      <title>Re: Replace multiple rows value from one column is not working properly</title>
      <link>https://community.jmp.com/t5/Discussions/Replace-multiple-rows-value-from-one-column-is-not-working/m-p/390974#M64106</link>
      <description>&lt;P&gt;Hi Jarmo,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you for your suggestion but it seems doesn't work for me.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;To clarify, i would like to replace values in original table based on the conditional of summary table.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have tried to run your code as well, and here's the result:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Selected rows from summary table:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="nthai_0-1622904024925.png" style="width: 400px;"&gt;&lt;img src="https://community.jmp.com/t5/image/serverpage/image-id/33288i85E8ACC6C64B3C8E/image-size/medium?v=v2&amp;amp;px=400" role="button" title="nthai_0-1622904024925.png" alt="nthai_0-1622904024925.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Selected rows from main table. There was 15 rows were selected but it replaced only 1st rows of each group:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="nthai_1-1622904069981.png" style="width: 400px;"&gt;&lt;img src="https://community.jmp.com/t5/image/serverpage/image-id/33289i10DF80201FAE2893/image-size/medium?v=v2&amp;amp;px=400" role="button" title="nthai_1-1622904069981.png" alt="nthai_1-1622904069981.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sat, 05 Jun 2021 14:43:35 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Replace-multiple-rows-value-from-one-column-is-not-working/m-p/390974#M64106</guid>
      <dc:creator>nthai</dc:creator>
      <dc:date>2021-06-05T14:43:35Z</dc:date>
    </item>
    <item>
      <title>Re: Replace multiple rows value from one column is not working properly</title>
      <link>https://community.jmp.com/t5/Discussions/Replace-multiple-rows-value-from-one-column-is-not-working/m-p/390976#M64107</link>
      <description>&lt;P&gt;Which version of JMP are you using? I'm using 15.2.1 and my example seems to work just fine for me:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="jthi_0-1622905425290.png" style="width: 400px;"&gt;&lt;img src="https://community.jmp.com/t5/image/serverpage/image-id/33290i3A25974DE14BCE8E/image-size/medium?v=v2&amp;amp;px=400" role="button" title="jthi_0-1622905425290.png" alt="jthi_0-1622905425290.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sat, 05 Jun 2021 15:04:10 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Replace-multiple-rows-value-from-one-column-is-not-working/m-p/390976#M64107</guid>
      <dc:creator>jthi</dc:creator>
      <dc:date>2021-06-05T15:04:10Z</dc:date>
    </item>
    <item>
      <title>Re: Replace multiple rows value from one column is not working properly</title>
      <link>https://community.jmp.com/t5/Discussions/Replace-multiple-rows-value-from-one-column-is-not-working/m-p/390996#M64110</link>
      <description>&lt;P&gt;i'm using Jmp Pro 12.2.0, 64 bit version. Log file for your reference:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="nthai_2-1622909514433.png" style="width: 999px;"&gt;&lt;img src="https://community.jmp.com/t5/image/serverpage/image-id/33293iF78115DFEA8A57E0/image-size/large?v=v2&amp;amp;px=999" role="button" title="nthai_2-1622909514433.png" alt="nthai_2-1622909514433.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Although log file showing row number (-1) is not invalid but when i shows rows, there's no such row like that.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sat, 05 Jun 2021 16:15:08 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Replace-multiple-rows-value-from-one-column-is-not-working/m-p/390996#M64110</guid>
      <dc:creator>nthai</dc:creator>
      <dc:date>2021-06-05T16:15:08Z</dc:date>
    </item>
    <item>
      <title>Re: Replace multiple rows value from one column is not working properly</title>
      <link>https://community.jmp.com/t5/Discussions/Replace-multiple-rows-value-from-one-column-is-not-working/m-p/390997#M64111</link>
      <description>&lt;P&gt;Based on this&amp;nbsp;&lt;A href="https://community.jmp.com/t5/Uncharted/Data-table-subscripting/ba-p/21013" target="_blank" rel="noopener"&gt;Data table subscripting&lt;/A&gt; the way I'm setting the cell values might have become available in JMP13.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I'll try to avoid looping but I don't have access to older version of JMP than 15, so I'm not sure if this will work either:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;Names Default To Here(1);
dt_temp = Open("$SAMPLE_DATA/Big Class.jmp");
dt_summary = dt_temp &amp;lt;&amp;lt; Summary(Group(:age, :sex), Freq("None"), Weight("None"), output table name( "summary" ));
dt_summary &amp;lt;&amp;lt; Select Where(:N Rows &amp;gt;= 3 &amp;amp; !Contains(:sex, "M"));&lt;BR /&gt;
//get rows which should be set to empty
rows = dt_temp &amp;lt;&amp;lt; Get Selected Rows;
//get all values in name column
colValues = dt_temp:name &amp;lt;&amp;lt; get values; 
show(colValues);
//set selected rows in the colValues list to ""
colValues[rows] = ""; 
show(colValues);
dt_temp:name &amp;lt;&amp;lt; Set Values(colValues);&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sat, 05 Jun 2021 16:23:40 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Replace-multiple-rows-value-from-one-column-is-not-working/m-p/390997#M64111</guid>
      <dc:creator>jthi</dc:creator>
      <dc:date>2021-06-05T16:23:40Z</dc:date>
    </item>
    <item>
      <title>Re: Replace multiple rows value from one column is not working properly</title>
      <link>https://community.jmp.com/t5/Discussions/Replace-multiple-rows-value-from-one-column-is-not-working/m-p/391002#M64114</link>
      <description>&lt;P&gt;Try closing the summary table before setting the values in the original table.&amp;nbsp; The Summary table is linked to the original and is keeping it from being updated.&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;dt_temp = data table("aaaa");

dt_summ = dt_temp &amp;lt;&amp;lt; Summary( Group( :Column1,:Column2), Freq( "None" ), Weight( "None" ),output table name( "summary" ) );
data table("summary") &amp;lt;&amp;lt; select where (:N rows &amp;gt;= 2 &amp;amp; !contains(:Column1,"AA") &amp;amp; !contains(:Column1,"BB") );
rows = dt_temp &amp;lt;&amp;lt; get selected rows; 
close( dt_summ, nosave );


dt_temp:Column3[rows] = "";
//Column(dt_temp, "Column3")[rows] = "";&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Sat, 05 Jun 2021 17:09:37 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Replace-multiple-rows-value-from-one-column-is-not-working/m-p/391002#M64114</guid>
      <dc:creator>txnelson</dc:creator>
      <dc:date>2021-06-05T17:09:37Z</dc:date>
    </item>
    <item>
      <title>Re: Replace multiple rows value from one column is not working properly</title>
      <link>https://community.jmp.com/t5/Discussions/Replace-multiple-rows-value-from-one-column-is-not-working/m-p/391005#M64115</link>
      <description>&lt;P&gt;Thank you Jim and Jarmo! Both solutions works like a charm for me!&lt;/P&gt;</description>
      <pubDate>Sat, 05 Jun 2021 17:35:38 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Replace-multiple-rows-value-from-one-column-is-not-working/m-p/391005#M64115</guid>
      <dc:creator>nthai</dc:creator>
      <dc:date>2021-06-05T17:35:38Z</dc:date>
    </item>
  </channel>
</rss>

