<?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 What is the JSL equivalent of Cols&amp;gt;&amp;gt; Column Names&amp;gt;&amp;gt;Move Up ? in Discussions</title>
    <link>https://community.jmp.com/t5/Discussions/What-is-the-JSL-equivalent-of-Cols-gt-gt-Column-Names-gt-gt-Move/m-p/677844#M86422</link>
    <description>&lt;P&gt;For an open data table, what is the JSL equivalent to&amp;nbsp;Cols&amp;gt;&amp;gt; Column Names&amp;gt;&amp;gt;Move Up ?&lt;/P&gt;&lt;P&gt;(cannot see the script in the log when I do this interactively)&lt;/P&gt;&lt;P&gt;I need to make the first row of my data table as header (via JSL). I am on JMP 16.&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Neo_0-1694709584989.png" style="width: 400px;"&gt;&lt;img src="https://community.jmp.com/t5/image/serverpage/image-id/56655iBA86081F6C5E6177/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Neo_0-1694709584989.png" alt="Neo_0-1694709584989.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Thu, 14 Sep 2023 16:42:37 GMT</pubDate>
    <dc:creator>Neo</dc:creator>
    <dc:date>2023-09-14T16:42:37Z</dc:date>
    <item>
      <title>What is the JSL equivalent of Cols&gt;&gt; Column Names&gt;&gt;Move Up ?</title>
      <link>https://community.jmp.com/t5/Discussions/What-is-the-JSL-equivalent-of-Cols-gt-gt-Column-Names-gt-gt-Move/m-p/677844#M86422</link>
      <description>&lt;P&gt;For an open data table, what is the JSL equivalent to&amp;nbsp;Cols&amp;gt;&amp;gt; Column Names&amp;gt;&amp;gt;Move Up ?&lt;/P&gt;&lt;P&gt;(cannot see the script in the log when I do this interactively)&lt;/P&gt;&lt;P&gt;I need to make the first row of my data table as header (via JSL). I am on JMP 16.&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Neo_0-1694709584989.png" style="width: 400px;"&gt;&lt;img src="https://community.jmp.com/t5/image/serverpage/image-id/56655iBA86081F6C5E6177/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Neo_0-1694709584989.png" alt="Neo_0-1694709584989.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 14 Sep 2023 16:42:37 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/What-is-the-JSL-equivalent-of-Cols-gt-gt-Column-Names-gt-gt-Move/m-p/677844#M86422</guid>
      <dc:creator>Neo</dc:creator>
      <dc:date>2023-09-14T16:42:37Z</dc:date>
    </item>
    <item>
      <title>Re: What is the JSL equivalent of Cols&gt;&gt; Column Names&gt;&gt;Move Up ?</title>
      <link>https://community.jmp.com/t5/Discussions/What-is-the-JSL-equivalent-of-Cols-gt-gt-Column-Names-gt-gt-Move/m-p/677859#M86424</link>
      <description>&lt;P&gt;Here is one way to do this&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;Names Default To Here( 1 );
dt = Current Data Table();
colNameList = dt &amp;lt;&amp;lt; get column names( string );
For Each( {col}, colNameList,
	Column( col ) &amp;lt;&amp;lt; set name( Char( As Column( col )[1] ) )
);

dt &amp;lt;&amp;lt; delete rows(1);&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Thu, 14 Sep 2023 17:18:15 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/What-is-the-JSL-equivalent-of-Cols-gt-gt-Column-Names-gt-gt-Move/m-p/677859#M86424</guid>
      <dc:creator>txnelson</dc:creator>
      <dc:date>2023-09-14T17:18:15Z</dc:date>
    </item>
    <item>
      <title>Re: What is the JSL equivalent of Cols&gt;&gt; Column Names&gt;&gt;Move Up ?</title>
      <link>https://community.jmp.com/t5/Discussions/What-is-the-JSL-equivalent-of-Cols-gt-gt-Column-Names-gt-gt-Move/m-p/677899#M86430</link>
      <description>&lt;P&gt;This might be too simple&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;Main Menu( "Move Up" );&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;Main Menu executes commands from the main menu.&lt;/P&gt;</description>
      <pubDate>Thu, 14 Sep 2023 19:27:10 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/What-is-the-JSL-equivalent-of-Cols-gt-gt-Column-Names-gt-gt-Move/m-p/677899#M86430</guid>
      <dc:creator>Byron_JMP</dc:creator>
      <dc:date>2023-09-14T19:27:10Z</dc:date>
    </item>
    <item>
      <title>Re: What is the JSL equivalent of Cols&gt;&gt; Column Names&gt;&gt;Move Up ?</title>
      <link>https://community.jmp.com/t5/Discussions/What-is-the-JSL-equivalent-of-Cols-gt-gt-Column-Names-gt-gt-Move/m-p/678014#M86440</link>
      <description>&lt;P&gt;There is also &lt;EM&gt;&amp;lt;&amp;lt; Move Up&lt;/EM&gt;&amp;nbsp;(added in JMP16 and JMP17 scripting index has information what it really does) message which can be sent to datatable&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="jthi_0-1694760974370.png" style="width: 400px;"&gt;&lt;img src="https://community.jmp.com/t5/image/serverpage/image-id/56660iB5ABFA07A6840F49/image-size/medium?v=v2&amp;amp;px=400" role="button" title="jthi_0-1694760974370.png" alt="jthi_0-1694760974370.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 15 Sep 2023 06:57:44 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/What-is-the-JSL-equivalent-of-Cols-gt-gt-Column-Names-gt-gt-Move/m-p/678014#M86440</guid>
      <dc:creator>jthi</dc:creator>
      <dc:date>2023-09-15T06:57:44Z</dc:date>
    </item>
    <item>
      <title>Re: What is the JSL equivalent of Cols&gt;&gt; Column Names&gt;&gt;Move Up ?</title>
      <link>https://community.jmp.com/t5/Discussions/What-is-the-JSL-equivalent-of-Cols-gt-gt-Column-Names-gt-gt-Move/m-p/678025#M86442</link>
      <description>&lt;P&gt;&lt;a href="https://community.jmp.com/t5/user/viewprofilepage/user-id/14366"&gt;@jthi&lt;/a&gt;&amp;nbsp;. Do not see this example in JMP 16.2.0 scripting index.&lt;/P&gt;&lt;P&gt;Also,&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;dt&amp;lt;&amp;lt; Move up;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;does not seem to work in 16.2.0.&lt;/P&gt;</description>
      <pubDate>Fri, 15 Sep 2023 08:53:44 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/What-is-the-JSL-equivalent-of-Cols-gt-gt-Column-Names-gt-gt-Move/m-p/678025#M86442</guid>
      <dc:creator>Neo</dc:creator>
      <dc:date>2023-09-15T08:53:44Z</dc:date>
    </item>
    <item>
      <title>Re: What is the JSL equivalent of Cols&gt;&gt; Column Names&gt;&gt;Move Up ?</title>
      <link>https://community.jmp.com/t5/Discussions/What-is-the-JSL-equivalent-of-Cols-gt-gt-Column-Names-gt-gt-Move/m-p/678027#M86443</link>
      <description>&lt;P&gt;My earlier post had snippet from JMP 17.2 Scripting Index. This is from my JMP (Pro) 16.2&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="jthi_0-1694767116279.png" style="width: 400px;"&gt;&lt;img src="https://community.jmp.com/t5/image/serverpage/image-id/56661i0D0639BBDFC4A419/image-size/medium?v=v2&amp;amp;px=400" role="button" title="jthi_0-1694767116279.png" alt="jthi_0-1694767116279.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;But the command doesn't seem to work, so I would suggest using the Main Menu option. One thing to be careful with is that Move Up will affect current data table and the &lt;A href="https://www.jmp.com/support/help/en/17.2/#page/jmp/utility-functions.shtml?os=win&amp;amp;source=application#ww2798238" target="_blank" rel="noopener"&gt;main menu()&lt;/A&gt;&amp;nbsp;doesn't seem to obey optional &lt;EM&gt;&amp;lt;window name&amp;gt;&lt;/EM&gt; argument properly. So it might be a good idea to force Current Data Table() before running the command&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;Names Default To Here(1);

dt = Open("$SAMPLE_DATA/Big Class.jmp");
dt1 = Open("$SAMPLE_DATA/Iris.jmp");
Current Data Table(dt1);

Eval(EvalExpr(
	Main Menu("Cols:Move Up", Expr((dt &amp;lt;&amp;lt; get name)));
));

wait(1);

Current Data Table(dt);
Main Menu("Cols:Move Up", "Big Class");&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;Big Class should have its column titles changed twice, but for some reason both tables get them changed once.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 15 Sep 2023 08:50:28 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/What-is-the-JSL-equivalent-of-Cols-gt-gt-Column-Names-gt-gt-Move/m-p/678027#M86443</guid>
      <dc:creator>jthi</dc:creator>
      <dc:date>2023-09-15T08:50:28Z</dc:date>
    </item>
  </channel>
</rss>

