<?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 Copy-Paste error with JSL [Column &amp;quot;???&amp;quot; requires numeric vlaues] in Discussions</title>
    <link>https://community.jmp.com/t5/Discussions/Copy-Paste-error-with-JSL-Column-quot-quot-requires-numeric/m-p/466888#M71069</link>
    <description>&lt;P&gt;I don't&amp;nbsp; know why this isn't working. I select rows who are empty, select a seccond column and try to copy them into the empty ones.&lt;/P&gt;&lt;P&gt;Both columns are numeric and it worked sometimes with other tables.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Sample table ans script is attached.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;dt_2= data table("Untitled 20");
dt_2 &amp;lt;&amp;lt; Select Where(Is Missing( :target1));
rs = dt_2 &amp;lt;&amp;lt; Get Selected Rows();
if(nitems(rs)&amp;gt;0,
	dt_2:target1[rs] = dt_2:temp1[rs];
	dt_2:target2[rs] = dt_2:temp2[rs];
	//dt_2 &amp;lt;&amp;lt; Delete Columns( :temp , :temp2 );
);&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;Alert:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Error message.png" style="width: 400px;"&gt;&lt;img src="https://community.jmp.com/t5/image/serverpage/image-id/40526i677E9476384C304D/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Error message.png" alt="Error message.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;THX&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Mauro&lt;/P&gt;</description>
    <pubDate>Fri, 09 Jun 2023 18:12:13 GMT</pubDate>
    <dc:creator>Mauro_Gerber</dc:creator>
    <dc:date>2023-06-09T18:12:13Z</dc:date>
    <item>
      <title>Copy-Paste error with JSL [Column "???" requires numeric vlaues]</title>
      <link>https://community.jmp.com/t5/Discussions/Copy-Paste-error-with-JSL-Column-quot-quot-requires-numeric/m-p/466888#M71069</link>
      <description>&lt;P&gt;I don't&amp;nbsp; know why this isn't working. I select rows who are empty, select a seccond column and try to copy them into the empty ones.&lt;/P&gt;&lt;P&gt;Both columns are numeric and it worked sometimes with other tables.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Sample table ans script is attached.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;dt_2= data table("Untitled 20");
dt_2 &amp;lt;&amp;lt; Select Where(Is Missing( :target1));
rs = dt_2 &amp;lt;&amp;lt; Get Selected Rows();
if(nitems(rs)&amp;gt;0,
	dt_2:target1[rs] = dt_2:temp1[rs];
	dt_2:target2[rs] = dt_2:temp2[rs];
	//dt_2 &amp;lt;&amp;lt; Delete Columns( :temp , :temp2 );
);&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;Alert:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Error message.png" style="width: 400px;"&gt;&lt;img src="https://community.jmp.com/t5/image/serverpage/image-id/40526i677E9476384C304D/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Error message.png" alt="Error message.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;THX&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Mauro&lt;/P&gt;</description>
      <pubDate>Fri, 09 Jun 2023 18:12:13 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Copy-Paste-error-with-JSL-Column-quot-quot-requires-numeric/m-p/466888#M71069</guid>
      <dc:creator>Mauro_Gerber</dc:creator>
      <dc:date>2023-06-09T18:12:13Z</dc:date>
    </item>
    <item>
      <title>Re: Copy-Paste error with JSL [Column "???" requires numeric vlaues]</title>
      <link>https://community.jmp.com/t5/Discussions/Copy-Paste-error-with-JSL-Column-quot-quot-requires-numeric/m-p/466946#M71072</link>
      <description>&lt;OL&gt;
&lt;LI&gt;In your provided data table, your "temp" columns are "temp" and "temp2", not "temp1" and "temp2"&lt;/LI&gt;
&lt;LI&gt;You need to loop through the assignments.&amp;nbsp; A JMP data table can not handle assignments where the right hand argument has multiple values.&amp;nbsp; See my changes below&amp;nbsp;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;Names Default To Here( 1 );
dt_2 = Data Table( "Untitled 20" );
// dt_2 &amp;lt;&amp;lt; Select Where( Is Missing( :target1 ) );
// rs = dt_2 &amp;lt;&amp;lt; Get Selected Rows();
// Simplier code
rs = dt_2 &amp;lt;&amp;lt; Get Rows Where( Is Missing( :target1 ) );
If( N Items( rs ) &amp;gt; 0,
	For( i = 1, i &amp;lt;= N Items( rs ), i++,
		dt_2:target1[rs[i]] = dt_2:temp[rs[i]];
		dt_2:target2[rs[i]] = dt_2:temp2[rs[i]];
	//dt_2 &amp;lt;&amp;lt; Delete Columns( :temp , :temp2 );
	)
);&lt;/CODE&gt;&lt;/PRE&gt;
&lt;/LI&gt;
&lt;/OL&gt;</description>
      <pubDate>Fri, 04 Mar 2022 09:07:58 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Copy-Paste-error-with-JSL-Column-quot-quot-requires-numeric/m-p/466946#M71072</guid>
      <dc:creator>txnelson</dc:creator>
      <dc:date>2022-03-04T09:07:58Z</dc:date>
    </item>
    <item>
      <title>Re: Copy-Paste error with JSL [Column "???" requires numeric vlaues]</title>
      <link>https://community.jmp.com/t5/Discussions/Copy-Paste-error-with-JSL-Column-quot-quot-requires-numeric/m-p/467428#M71147</link>
      <description>&lt;P&gt;THX&amp;nbsp;&lt;a href="https://community.jmp.com/t5/user/viewprofilepage/user-id/2687"&gt;@txnelson&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;This works, but I try to avoid for-loops.&lt;/P&gt;&lt;P&gt;It works with an array, but not with the table itself:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;temp = dt_2:tartet2 &amp;lt;&amp;lt; get values();  // copy row from target
temp[rs] = dt_2:temp2[rs]; // replace the values in the array
dt_2:target2 &amp;lt;&amp;lt; set values(temp); // re-insert into target&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Mon, 07 Mar 2022 07:45:20 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Copy-Paste-error-with-JSL-Column-quot-quot-requires-numeric/m-p/467428#M71147</guid>
      <dc:creator>Mauro_Gerber</dc:creator>
      <dc:date>2022-03-07T07:45:20Z</dc:date>
    </item>
  </channel>
</rss>

