<?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: Any idea why Move Selected Columns works with a list was changed in JMP17? in Discussions</title>
    <link>https://community.jmp.com/t5/Discussions/Any-idea-why-Move-Selected-Columns-works-with-a-list-was-changed/m-p/671360#M85933</link>
    <description>&lt;P&gt;Hi David,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I was wondering: has the column sorting issue been fixed?&lt;/P&gt;</description>
    <pubDate>Fri, 25 Aug 2023 12:54:37 GMT</pubDate>
    <dc:creator>Pim</dc:creator>
    <dc:date>2023-08-25T12:54:37Z</dc:date>
    <item>
      <title>Any idea why Move Selected Columns works with a list was changed in JMP17?</title>
      <link>https://community.jmp.com/t5/Discussions/Any-idea-why-Move-Selected-Columns-works-with-a-list-was-changed/m-p/594187#M79806</link>
      <description>&lt;P&gt;Just noticed that my &lt;LI-MESSAGE title="Analyse Columns" uid="460329" url="https://community.jmp.com/t5/JMP-Add-Ins/Analyse-Columns/m-p/460329#U460329" discussion_style_icon_css="lia-mention-container-editor-message lia-img-icon-tkb-thread lia-fa-icon lia-fa-tkb lia-fa-thread lia-fa"&gt;&lt;/LI-MESSAGE&gt; doesn't work with JMP17, or even worse it returns incorrect data. Issue is that JMP17 has changed how Move Selected Columns works with a list.&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;Names Default To Here(1);

dt = Open( "$SAMPLE_DATA/Big Class.jmp");
list = {"sex", "name"};

wait(1);
dt &amp;lt;&amp;lt; Move Selected Columns(list, To Last);
show(JMP Version());&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;With this simple example you can see that JMP17 ignores the order of items in the list (or rather sorts alphabetically?)&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;JMP16:&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="jthi_1-1674837784475.png" style="width: 400px;"&gt;&lt;img src="https://community.jmp.com/t5/image/serverpage/image-id/49546iE48D8A1216595063/image-size/medium?v=v2&amp;amp;px=400" role="button" title="jthi_1-1674837784475.png" alt="jthi_1-1674837784475.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;JMP17:&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="jthi_0-1674837768976.png" style="width: 400px;"&gt;&lt;img src="https://community.jmp.com/t5/image/serverpage/image-id/49545i255387109A1C2D9D/image-size/medium?v=v2&amp;amp;px=400" role="button" title="jthi_0-1674837768976.png" alt="jthi_0-1674837768976.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I can figure out many ways to handle this, but I'm not really sure if I should have to&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;Names Default To Here(1);

dt = Open( "$SAMPLE_DATA/Big Class.jmp");

list = {"sex", "name", "age", "weight", "height"};
If(Num(Word(1, JMP Version(), ".")) &amp;lt; 17,
	dt &amp;lt;&amp;lt; Move Selected Columns(list, To Last);
, // else
	first_col = Remove From(list, 1);
	dt &amp;lt;&amp;lt; Move Selected Columns(first_col, To First);
	For Each({col}, list,
		Eval(EvalExpr(
			dt &amp;lt;&amp;lt; Move Selected Columns({Expr(col)}, To Last);
		));
	);
);&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Thu, 08 Jun 2023 16:40:26 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Any-idea-why-Move-Selected-Columns-works-with-a-list-was-changed/m-p/594187#M79806</guid>
      <dc:creator>jthi</dc:creator>
      <dc:date>2023-06-08T16:40:26Z</dc:date>
    </item>
    <item>
      <title>Re: Any idea why Move Selected Columns works with a list was changed in JMP17?</title>
      <link>https://community.jmp.com/t5/Discussions/Any-idea-why-Move-Selected-Columns-works-with-a-list-was-changed/m-p/594267#M79812</link>
      <description>&lt;P&gt;Joining the discussion to know if this is a bug.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;This will probably break the functionality in the column organizer add-in.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;A href="https://community.jmp.com/t5/JMP-Add-Ins/MES-data-retrieval-add-in-Aspentech-IP-21-and-Osisoft-PI-Aveva/ta-p/540841" target="_blank"&gt;https://community.jmp.com/t5/JMP-Add-Ins/MES-data-retrieval-add-in-Aspentech-IP-21-and-Osisoft-PI-Aveva/ta-p/540841&lt;/A&gt;&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="image2.png" style="width: 999px;"&gt;&lt;img src="https://community.jmp.com/t5/image/serverpage/image-id/49552iE2A8EC11239B0371/image-size/large?v=v2&amp;amp;px=999" role="button" title="image2.png" alt="image2.png" /&gt;&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 27 Jan 2023 19:39:43 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Any-idea-why-Move-Selected-Columns-works-with-a-list-was-changed/m-p/594267#M79812</guid>
      <dc:creator>FN</dc:creator>
      <dc:date>2023-01-27T19:39:43Z</dc:date>
    </item>
    <item>
      <title>Re: Any idea why Move Selected Columns works with a list was changed in JMP17?</title>
      <link>https://community.jmp.com/t5/Discussions/Any-idea-why-Move-Selected-Columns-works-with-a-list-was-changed/m-p/594405#M79817</link>
      <description>&lt;P&gt;Also most likely breaks this &lt;LI-MESSAGE title="Order Selected Columns" uid="451761" url="https://community.jmp.com/t5/JMP-Add-Ins/Order-Selected-Columns/m-p/451761#U451761" discussion_style_icon_css="lia-mention-container-editor-message lia-img-icon-tkb-thread lia-fa-icon lia-fa-tkb lia-fa-thread lia-fa"&gt;&lt;/LI-MESSAGE&gt; (seems to have some bugs even with JMP16).&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Might have to start adding limitation to add-ins that only specific versions work (will be a hassle to manage with multiple add-ins...).&lt;/P&gt;</description>
      <pubDate>Sat, 28 Jan 2023 08:56:51 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Any-idea-why-Move-Selected-Columns-works-with-a-list-was-changed/m-p/594405#M79817</guid>
      <dc:creator>jthi</dc:creator>
      <dc:date>2023-01-28T08:56:51Z</dc:date>
    </item>
    <item>
      <title>Re: Any idea why Move Selected Columns works with a list was changed in JMP17?</title>
      <link>https://community.jmp.com/t5/Discussions/Any-idea-why-Move-Selected-Columns-works-with-a-list-was-changed/m-p/595920#M79970</link>
      <description>&lt;P&gt;Have you contacted support to check if this change was intended?&lt;/P&gt;</description>
      <pubDate>Wed, 01 Feb 2023 15:12:25 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Any-idea-why-Move-Selected-Columns-works-with-a-list-was-changed/m-p/595920#M79970</guid>
      <dc:creator>FN</dc:creator>
      <dc:date>2023-02-01T15:12:25Z</dc:date>
    </item>
    <item>
      <title>Re: Any idea why Move Selected Columns works with a list was changed in JMP17?</title>
      <link>https://community.jmp.com/t5/Discussions/Any-idea-why-Move-Selected-Columns-works-with-a-list-was-changed/m-p/595977#M79975</link>
      <description>&lt;P&gt;I have but no response just yet.&lt;/P&gt;</description>
      <pubDate>Wed, 01 Feb 2023 16:18:03 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Any-idea-why-Move-Selected-Columns-works-with-a-list-was-changed/m-p/595977#M79975</guid>
      <dc:creator>jthi</dc:creator>
      <dc:date>2023-02-01T16:18:03Z</dc:date>
    </item>
    <item>
      <title>Re: Any idea why Move Selected Columns works with a list was changed in JMP17?</title>
      <link>https://community.jmp.com/t5/Discussions/Any-idea-why-Move-Selected-Columns-works-with-a-list-was-changed/m-p/596054#M79982</link>
      <description>&lt;P&gt;This was done to fix a crash. Unfortunately, it has proved to have unintended consequences.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;It isn't sorting the columns by name, it's maintaining their original ordering. No matter how you order columns in the list given to &lt;FONT face="courier new,courier"&gt;Move Selected Columns()&lt;/FONT&gt;, the moved columns will maintain their original ordering relative to each other. So if you have a table with columns a, b, c, and d, in that order, then both&amp;nbsp;&lt;FONT face="courier new,courier"&gt;Move Selected Columns({:b, :a}, To Last)&lt;/FONT&gt; and &lt;FONT face="courier new,courier"&gt;Move Selected Columns({:a, :b}, To Last)&lt;/FONT&gt; will result in the columns being ordered c, b, a, b.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;As you discovered, an admittedly inconvenient workaround is to issue multiple Move Selected Columns commands. So to get the order c, d, b, a you can call &lt;FONT face="courier new,courier"&gt;Move Selected Columns({:b}, To Last)&lt;/FONT&gt; then &lt;FONT face="courier new,courier"&gt;Move Selected Columns({:a}, To Last)&lt;/FONT&gt;.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;This will be fixed.&lt;/P&gt;</description>
      <pubDate>Wed, 01 Feb 2023 18:40:04 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Any-idea-why-Move-Selected-Columns-works-with-a-list-was-changed/m-p/596054#M79982</guid>
      <dc:creator>DavidWhite</dc:creator>
      <dc:date>2023-02-01T18:40:04Z</dc:date>
    </item>
    <item>
      <title>Re: Any idea why Move Selected Columns works with a list was changed in JMP17?</title>
      <link>https://community.jmp.com/t5/Discussions/Any-idea-why-Move-Selected-Columns-works-with-a-list-was-changed/m-p/671360#M85933</link>
      <description>&lt;P&gt;Hi David,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I was wondering: has the column sorting issue been fixed?&lt;/P&gt;</description>
      <pubDate>Fri, 25 Aug 2023 12:54:37 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Any-idea-why-Move-Selected-Columns-works-with-a-list-was-changed/m-p/671360#M85933</guid>
      <dc:creator>Pim</dc:creator>
      <dc:date>2023-08-25T12:54:37Z</dc:date>
    </item>
    <item>
      <title>Re: Any idea why Move Selected Columns works with a list was changed in JMP17?</title>
      <link>https://community.jmp.com/t5/Discussions/Any-idea-why-Move-Selected-Columns-works-with-a-list-was-changed/m-p/697628#M88310</link>
      <description>&lt;P&gt;Jarmo,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I just ran into this issue after recently upgrading to JMP 17. This is extremely frustrating since I was moving large column blocks (8 columns / block), with 24 total columns.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I wanted to try your solution, but still not totally understanding your "For Each" statement, even after reviewing scripting index.&amp;nbsp; So is it basically looking at each element in list, {col}, and moving it to the end of the list?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Neil&lt;/P&gt;</description>
      <pubDate>Mon, 13 Nov 2023 22:42:48 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Any-idea-why-Move-Selected-Columns-works-with-a-list-was-changed/m-p/697628#M88310</guid>
      <dc:creator>NRW</dc:creator>
      <dc:date>2023-11-13T22:42:48Z</dc:date>
    </item>
    <item>
      <title>Re: Any idea why Move Selected Columns works with a list was changed in JMP17?</title>
      <link>https://community.jmp.com/t5/Discussions/Any-idea-why-Move-Selected-Columns-works-with-a-list-was-changed/m-p/697692#M88315</link>
      <description>&lt;P&gt;It will move the items to end of list in order (so first one gets moved last as the first one -&amp;gt; ends up first in the end). If you want to do different kind of re-ordering (like re-ordering list of columns in place) the script would require some changes.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;This might have been fixed in JMP17.2, at least I'm getting different result now with my initial script&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="jthi_0-1699940708360.png" style="width: 400px;"&gt;&lt;img src="https://community.jmp.com/t5/image/serverpage/image-id/58647i436B31EE61865957/image-size/medium?v=v2&amp;amp;px=400" role="button" title="jthi_0-1699940708360.png" alt="jthi_0-1699940708360.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 14 Nov 2023 05:46:27 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Any-idea-why-Move-Selected-Columns-works-with-a-list-was-changed/m-p/697692#M88315</guid>
      <dc:creator>jthi</dc:creator>
      <dc:date>2023-11-14T05:46:27Z</dc:date>
    </item>
    <item>
      <title>Re: Any idea why Move Selected Columns works with a list was changed in JMP17?</title>
      <link>https://community.jmp.com/t5/Discussions/Any-idea-why-Move-Selected-Columns-works-with-a-list-was-changed/m-p/697855#M88328</link>
      <description>&lt;P&gt;Many thanks Jarmo!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I was able to get it working with this snippet as well.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;list = {:a, :b, :c, :d};
lst_num = NItems(list);

For(kk = 1, kk &amp;lt; list_num, kk++,
		dt &amp;lt;&amp;lt; Move Selected Columns({list[kk+1]}, After(list[kk]) );
);&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Tue, 14 Nov 2023 12:07:06 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Any-idea-why-Move-Selected-Columns-works-with-a-list-was-changed/m-p/697855#M88328</guid>
      <dc:creator>NRW</dc:creator>
      <dc:date>2023-11-14T12:07:06Z</dc:date>
    </item>
  </channel>
</rss>

