<?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 can I arrange column names in JMP file in alphabetical order (ascending and descending)? in Discussions</title>
    <link>https://community.jmp.com/t5/Discussions/How-can-I-arrange-column-names-in-JMP-file-in-alphabetical-order/m-p/813088#M99411</link>
    <description>&lt;P&gt;&lt;a href="https://community.jmp.com/t5/user/viewprofilepage/user-id/26800"&gt;@hogi&lt;/a&gt;&amp;nbsp;provides a way to interactively sort the columns into an ascending order.&amp;nbsp; Here is a little script that will sort in either direction.&amp;nbsp; It is currently set to sort them in a descending(reverse) order.&amp;nbsp; Just remove the Reverse() function and the order will be ascending.&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;Names Default To Here( 1 );

dt = 
// Open Data Table: semiconductor capability.jmp
// → Data Table( "semiconductor capability" )
Open( "$SAMPLE_DATA/semiconductor capability.jmp" );

colNameList = dt &amp;lt;&amp;lt; get column names( string );

colNameList = Reverse( Sort List( colNameList ) );

dt &amp;lt;&amp;lt; move selected columns( colNameList );&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;It should also be noted that when using a selection box for any of the JMP Platforms, such as Distribution, Fit Y by X, etc. the column list in the dialog box allows for the ascending and descending ordering of the column names for selection&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="txnelson_0-1731604519464.png" style="width: 652px;"&gt;&lt;img src="https://community.jmp.com/t5/image/serverpage/image-id/70163iCA7841256B10B920/image-dimensions/652x455?v=v2" width="652" height="455" role="button" title="txnelson_0-1731604519464.png" alt="txnelson_0-1731604519464.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Thu, 14 Nov 2024 17:15:31 GMT</pubDate>
    <dc:creator>txnelson</dc:creator>
    <dc:date>2024-11-14T17:15:31Z</dc:date>
    <item>
      <title>How can I arrange column names in JMP file in alphabetical order (ascending and descending)?</title>
      <link>https://community.jmp.com/t5/Discussions/How-can-I-arrange-column-names-in-JMP-file-in-alphabetical-order/m-p/813059#M99406</link>
      <description>&lt;P&gt;Hi&lt;/P&gt;&lt;P&gt;Is there any method in JMP Pro that can arrange the column names in alphabetical order (ascending and descending)?&lt;/P&gt;&lt;P&gt;I have named the variables by acronyms only (see examples below).&lt;/P&gt;&lt;TABLE&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;ACCMLAMEB&lt;/TD&gt;&lt;TD&gt;Is both the insured driver [you] and other driver jointly to blame for this incident? Yes/No 2&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;ACCMLAMEBR&lt;/TD&gt;&lt;TD&gt;If Yes/No, why? Give justification [in texts] between 50 and 100 words 3&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;TABLE&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;DAMVICSIDE&lt;/TD&gt;&lt;TD&gt;Damage to vehicle/Point of impact [front/back/driver side/passenger side]&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;DASHCAMF&lt;/TD&gt;&lt;TD&gt;Did you have any dash cam fitted in your car during the accident? [Yes/No]&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;DASHCAMOP&lt;/TD&gt;&lt;TD&gt;Was the dashcam in full operation during the accident? [Yes/No]&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;TABLE&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;LCLAIMY&lt;/TD&gt;&lt;TD&gt;What is the largest claim did you file in past with any insurer since you started driving? [in £ amount]&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;LICCAT&lt;/TD&gt;&lt;TD&gt;Category of driving license&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;LICYR&lt;/TD&gt;&lt;TD&gt;Number of years of driving license held&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;LINECHFRE&lt;/TD&gt;&lt;TD&gt;Frequency of Lane Changes per Trip&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;LOCINCC&lt;/TD&gt;&lt;TD&gt;Location of the incident [Country]&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;LOCINCD&lt;/TD&gt;&lt;TD&gt;Location of the incident [district name]&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;LOCINCS&lt;/TD&gt;&lt;TD&gt;&lt;P&gt;Location of the incident [street name]&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;Currently, I can see the acronyms (abbreviations) of the variable definitions but not in order (see the attached screenshot). This takes me to time to locate the variable on the that I want to include in the model.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 14 Nov 2024 15:54:42 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/How-can-I-arrange-column-names-in-JMP-file-in-alphabetical-order/m-p/813059#M99406</guid>
      <dc:creator>madhu</dc:creator>
      <dc:date>2024-11-14T15:54:42Z</dc:date>
    </item>
    <item>
      <title>Re: How can I arrange column names in JMP file in alphabetical order (ascending and descending)?</title>
      <link>https://community.jmp.com/t5/Discussions/How-can-I-arrange-column-names-in-JMP-file-in-alphabetical-order/m-p/813070#M99407</link>
      <description>&lt;P&gt;you can reorder the columns "by name" via the Cols menu:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="hogi_0-1731599791655.png" style="width: 400px;"&gt;&lt;img src="https://community.jmp.com/t5/image/serverpage/image-id/70159i58F74E828400AF45/image-size/medium?v=v2&amp;amp;px=400" role="button" title="hogi_0-1731599791655.png" alt="hogi_0-1731599791655.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 14 Nov 2024 18:18:02 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/How-can-I-arrange-column-names-in-JMP-file-in-alphabetical-order/m-p/813070#M99407</guid>
      <dc:creator>hogi</dc:creator>
      <dc:date>2024-11-14T18:18:02Z</dc:date>
    </item>
    <item>
      <title>Re: How can I arrange column names in JMP file in alphabetical order (ascending and descending)?</title>
      <link>https://community.jmp.com/t5/Discussions/How-can-I-arrange-column-names-in-JMP-file-in-alphabetical-order/m-p/813088#M99411</link>
      <description>&lt;P&gt;&lt;a href="https://community.jmp.com/t5/user/viewprofilepage/user-id/26800"&gt;@hogi&lt;/a&gt;&amp;nbsp;provides a way to interactively sort the columns into an ascending order.&amp;nbsp; Here is a little script that will sort in either direction.&amp;nbsp; It is currently set to sort them in a descending(reverse) order.&amp;nbsp; Just remove the Reverse() function and the order will be ascending.&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;Names Default To Here( 1 );

dt = 
// Open Data Table: semiconductor capability.jmp
// → Data Table( "semiconductor capability" )
Open( "$SAMPLE_DATA/semiconductor capability.jmp" );

colNameList = dt &amp;lt;&amp;lt; get column names( string );

colNameList = Reverse( Sort List( colNameList ) );

dt &amp;lt;&amp;lt; move selected columns( colNameList );&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;It should also be noted that when using a selection box for any of the JMP Platforms, such as Distribution, Fit Y by X, etc. the column list in the dialog box allows for the ascending and descending ordering of the column names for selection&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="txnelson_0-1731604519464.png" style="width: 652px;"&gt;&lt;img src="https://community.jmp.com/t5/image/serverpage/image-id/70163iCA7841256B10B920/image-dimensions/652x455?v=v2" width="652" height="455" role="button" title="txnelson_0-1731604519464.png" alt="txnelson_0-1731604519464.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 14 Nov 2024 17:15:31 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/How-can-I-arrange-column-names-in-JMP-file-in-alphabetical-order/m-p/813088#M99411</guid>
      <dc:creator>txnelson</dc:creator>
      <dc:date>2024-11-14T17:15:31Z</dc:date>
    </item>
    <item>
      <title>Re: How can I arrange column names in JMP file in alphabetical order (ascending and descending)?</title>
      <link>https://community.jmp.com/t5/Discussions/How-can-I-arrange-column-names-in-JMP-file-in-alphabetical-order/m-p/813169#M99425</link>
      <description>&lt;P&gt;Dear&amp;nbsp;&lt;a href="https://community.jmp.com/t5/user/viewprofilepage/user-id/26800"&gt;@hogi&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;This works. Thank you for your support.&lt;/P&gt;&lt;P&gt;KR&lt;/P&gt;&lt;P&gt;M&lt;/P&gt;</description>
      <pubDate>Fri, 15 Nov 2024 01:35:53 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/How-can-I-arrange-column-names-in-JMP-file-in-alphabetical-order/m-p/813169#M99425</guid>
      <dc:creator>madhu</dc:creator>
      <dc:date>2024-11-15T01:35:53Z</dc:date>
    </item>
    <item>
      <title>Re: How can I arrange column names in JMP file in alphabetical order (ascending and descending)?</title>
      <link>https://community.jmp.com/t5/Discussions/How-can-I-arrange-column-names-in-JMP-file-in-alphabetical-order/m-p/813170#M99426</link>
      <description>&lt;P&gt;Dear&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;Thank you for the solution. However, I am not familiar wit the script. How can I use the script you suggested?&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;M&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 15 Nov 2024 01:39:53 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/How-can-I-arrange-column-names-in-JMP-file-in-alphabetical-order/m-p/813170#M99426</guid>
      <dc:creator>madhu</dc:creator>
      <dc:date>2024-11-15T01:39:53Z</dc:date>
    </item>
    <item>
      <title>Re: How can I arrange column names in JMP file in alphabetical order (ascending and descending)?</title>
      <link>https://community.jmp.com/t5/Discussions/How-can-I-arrange-column-names-in-JMP-file-in-alphabetical-order/m-p/813192#M99429</link>
      <description>&lt;P&gt;The example that I provided will open a sample data table called Semiconductor Capability, which happens to have something like 132 column.&amp;nbsp; It will then reorder the columns in a descending alphabetical order.&amp;nbsp; You will be able to observe the end result by clicking on the window for the data table.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;To actually run the script, all you need to do, is to cut an paste the script from my response to a script window. And then run the script.&amp;nbsp; To do this just&lt;/P&gt;
&lt;P&gt;Go to&lt;/P&gt;
&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;File=&amp;gt;New=&amp;gt;JSL Script&lt;/P&gt;
&lt;P&gt;Right Click on the first line on the script and then select Paste&lt;/P&gt;
&lt;P&gt;The script will be displayed in the script window.&lt;/P&gt;
&lt;P&gt;Then to run the script, either click on the Icon with the green Run JSL triangle&amp;nbsp; in the JSL tool bar at the top of the JMP window or Right Click anywhere on the script and select Run Script.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;A very minor change to the script can set it up so that when ever it is run, it will do the reodering for whatever data table is the current active data table.&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 );
colNameList = Reverse( Sort List( colNameList ) );
dt &amp;lt;&amp;lt; move selected columns( colNameList );&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;If you want, this script can be added as a new tool on the tool bar that will set it up to run whenever the tool is clicked on.&amp;nbsp; You can read up on how to do that under the JMP Help&lt;/P&gt;</description>
      <pubDate>Fri, 15 Nov 2024 04:35:16 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/How-can-I-arrange-column-names-in-JMP-file-in-alphabetical-order/m-p/813192#M99429</guid>
      <dc:creator>txnelson</dc:creator>
      <dc:date>2024-11-15T04:35:16Z</dc:date>
    </item>
  </channel>
</rss>

