<?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: Move Selected  Columns() with list parameter in Discussions</title>
    <link>https://community.jmp.com/t5/Discussions/Move-Selected-Columns-with-list-parameter/m-p/108921#M39562</link>
    <description>&lt;P&gt;I'm glad to hear a workaround has been found. In the meantime, we reported this issue to development, and JMP 15 (available later this year) has been updated so that the evaluation will happen automatically. Thanks!&lt;/P&gt;</description>
    <pubDate>Tue, 05 Feb 2019 18:35:13 GMT</pubDate>
    <dc:creator>Audrey_Shull</dc:creator>
    <dc:date>2019-02-05T18:35:13Z</dc:date>
    <item>
      <title>Move Selected  Columns() with list parameter</title>
      <link>https://community.jmp.com/t5/Discussions/Move-Selected-Columns-with-list-parameter/m-p/108064#M39322</link>
      <description>&lt;P&gt;If I have a table with five columns:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;TABLE border="1"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;&lt;STRONG&gt;Column 5&lt;/STRONG&gt;&lt;/TD&gt;&lt;TD&gt;&lt;STRONG&gt;Column 3&lt;/STRONG&gt;&lt;/TD&gt;&lt;TD&gt;&lt;STRONG&gt;Column 2&lt;/STRONG&gt;&lt;/TD&gt;&lt;TD&gt;&lt;STRONG&gt;Column 1&lt;/STRONG&gt;&lt;/TD&gt;&lt;TD&gt;&lt;STRONG&gt;Column 4&lt;/STRONG&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;data&lt;/TD&gt;&lt;TD&gt;data&lt;/TD&gt;&lt;TD&gt;data&lt;/TD&gt;&lt;TD&gt;data&lt;/TD&gt;&lt;TD&gt;data&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;and I execute this:&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;dt = Current Data Table();
dt &amp;lt;&amp;lt; Move Selected Columns({"Column 1", "Column 2", "Column 3", "Column 4", "Column 5"}, To first)&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;then I get this:&lt;/P&gt;&lt;TABLE border="1"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;&lt;STRONG&gt;Column 1&lt;/STRONG&gt;&lt;/TD&gt;&lt;TD&gt;&lt;STRONG&gt;Column 2&lt;/STRONG&gt;&lt;/TD&gt;&lt;TD&gt;&lt;STRONG&gt;Column 3&lt;/STRONG&gt;&lt;/TD&gt;&lt;TD&gt;&lt;STRONG&gt;Column 4&lt;/STRONG&gt;&lt;/TD&gt;&lt;TD&gt;&lt;STRONG&gt;Column 5&lt;/STRONG&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;data&lt;/TD&gt;&lt;TD&gt;data&lt;/TD&gt;&lt;TD&gt;data&lt;/TD&gt;&lt;TD&gt;data&lt;/TD&gt;&lt;TD&gt;&lt;P&gt;data&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;But if I execute this:&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;dt= Current Data Table();
list = {"Column 1", "Column 2", "Column 3", "Column 4", "Column 5"};
dt &amp;lt;&amp;lt; Move Selected Columns( list, To first); &lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;it fails with an "Unrecognized key word" error.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I need to be able to parameterize the column list, as in the second version. How can I make something like the second version work?&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sun, 27 Jan 2019 19:09:01 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Move-Selected-Columns-with-list-parameter/m-p/108064#M39322</guid>
      <dc:creator>john_madden</dc:creator>
      <dc:date>2019-01-27T19:09:01Z</dc:date>
    </item>
    <item>
      <title>Re: Move Selected  Columns() with list parameter</title>
      <link>https://community.jmp.com/t5/Discussions/Move-Selected-Columns-with-list-parameter/m-p/108065#M39323</link>
      <description>&lt;P&gt;I tried various flavors of as list(), listeval(), expr, evalexpr(), etc. to no avail.&amp;nbsp; Had to resort to eval(parse()):&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;dt = current data table();

alist = {"Column 4", "Column 3", "Column 2", "Column 1"};
clist = char(alist);

col_expr = evalinsert("dt &amp;lt;&amp;lt; move selected columns(^clist^, to first)");

eval(parse(col_expr));&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Sun, 27 Jan 2019 20:37:42 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Move-Selected-Columns-with-list-parameter/m-p/108065#M39323</guid>
      <dc:creator>pmroz</dc:creator>
      <dc:date>2019-01-27T20:37:42Z</dc:date>
    </item>
    <item>
      <title>Re: Move Selected  Columns() with list parameter</title>
      <link>https://community.jmp.com/t5/Discussions/Move-Selected-Columns-with-list-parameter/m-p/108066#M39324</link>
      <description>Thanks, that works for me!</description>
      <pubDate>Sun, 27 Jan 2019 21:25:44 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Move-Selected-Columns-with-list-parameter/m-p/108066#M39324</guid>
      <dc:creator>john_madden</dc:creator>
      <dc:date>2019-01-27T21:25:44Z</dc:date>
    </item>
    <item>
      <title>Re: Move Selected  Columns() with list parameter</title>
      <link>https://community.jmp.com/t5/Discussions/Move-Selected-Columns-with-list-parameter/m-p/108140#M39344</link>
      <description>&lt;P&gt;This is just an alternate method, and FYI.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;You can also do this with expressions.&amp;nbsp; Eval Expr() replaces each Expr() with its value (name expression), and the external Eval() function, executes the command.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;dt= Current Data Table();
list = {"Column 1", "Column 2", "Column 3", "Column 4", "Column 5"};
Eval( Eval Expr(dt &amp;lt;&amp;lt; Move Selected Columns( Expr(list), To first)) ); &lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Mon, 28 Jan 2019 20:01:51 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Move-Selected-Columns-with-list-parameter/m-p/108140#M39344</guid>
      <dc:creator>gzmorgan0</dc:creator>
      <dc:date>2019-01-28T20:01:51Z</dc:date>
    </item>
    <item>
      <title>Re: Move Selected  Columns() with list parameter</title>
      <link>https://community.jmp.com/t5/Discussions/Move-Selected-Columns-with-list-parameter/m-p/108921#M39562</link>
      <description>&lt;P&gt;I'm glad to hear a workaround has been found. In the meantime, we reported this issue to development, and JMP 15 (available later this year) has been updated so that the evaluation will happen automatically. Thanks!&lt;/P&gt;</description>
      <pubDate>Tue, 05 Feb 2019 18:35:13 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Move-Selected-Columns-with-list-parameter/m-p/108921#M39562</guid>
      <dc:creator>Audrey_Shull</dc:creator>
      <dc:date>2019-02-05T18:35:13Z</dc:date>
    </item>
  </channel>
</rss>

