<?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 How to do value ordering that has values that contains a specific word? in Discussions</title>
    <link>https://community.jmp.com/t5/Discussions/How-to-do-value-ordering-that-has-values-that-contains-a/m-p/804601#M98228</link>
    <description>&lt;P&gt;Hi all,&lt;/P&gt;&lt;P&gt;How can I create a line of code that will arrange my columns using Value Ordering? I needed the values that contains the word "new" to be on the bottom.&lt;BR /&gt;&lt;BR /&gt;&lt;STRONG&gt;Original Values&lt;/STRONG&gt;&lt;BR /&gt;F1&lt;BR /&gt;F2&lt;BR /&gt;F3&lt;BR /&gt;F4 - NEW&lt;BR /&gt;F5&lt;BR /&gt;F6 - NEW&lt;BR /&gt;F7&amp;nbsp;&lt;BR /&gt;F8&lt;BR /&gt;F9 - NEW&lt;BR /&gt;F10 - NEW&lt;BR /&gt;&lt;BR /&gt;&lt;STRONG&gt;With Value Ordering&lt;BR /&gt;&lt;/STRONG&gt;F1&lt;BR /&gt;F2&lt;BR /&gt;F3&lt;BR /&gt;F5&lt;BR /&gt;F7&amp;nbsp;&lt;BR /&gt;F8&lt;BR /&gt;F4 - NEW&lt;BR /&gt;F6 - NEW&lt;BR /&gt;F9 - NEW&lt;BR /&gt;F10 - NEW&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;</description>
    <pubDate>Thu, 10 Oct 2024 05:20:36 GMT</pubDate>
    <dc:creator>UserID16644</dc:creator>
    <dc:date>2024-10-10T05:20:36Z</dc:date>
    <item>
      <title>How to do value ordering that has values that contains a specific word?</title>
      <link>https://community.jmp.com/t5/Discussions/How-to-do-value-ordering-that-has-values-that-contains-a/m-p/804601#M98228</link>
      <description>&lt;P&gt;Hi all,&lt;/P&gt;&lt;P&gt;How can I create a line of code that will arrange my columns using Value Ordering? I needed the values that contains the word "new" to be on the bottom.&lt;BR /&gt;&lt;BR /&gt;&lt;STRONG&gt;Original Values&lt;/STRONG&gt;&lt;BR /&gt;F1&lt;BR /&gt;F2&lt;BR /&gt;F3&lt;BR /&gt;F4 - NEW&lt;BR /&gt;F5&lt;BR /&gt;F6 - NEW&lt;BR /&gt;F7&amp;nbsp;&lt;BR /&gt;F8&lt;BR /&gt;F9 - NEW&lt;BR /&gt;F10 - NEW&lt;BR /&gt;&lt;BR /&gt;&lt;STRONG&gt;With Value Ordering&lt;BR /&gt;&lt;/STRONG&gt;F1&lt;BR /&gt;F2&lt;BR /&gt;F3&lt;BR /&gt;F5&lt;BR /&gt;F7&amp;nbsp;&lt;BR /&gt;F8&lt;BR /&gt;F4 - NEW&lt;BR /&gt;F6 - NEW&lt;BR /&gt;F9 - NEW&lt;BR /&gt;F10 - NEW&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 10 Oct 2024 05:20:36 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/How-to-do-value-ordering-that-has-values-that-contains-a/m-p/804601#M98228</guid>
      <dc:creator>UserID16644</dc:creator>
      <dc:date>2024-10-10T05:20:36Z</dc:date>
    </item>
    <item>
      <title>Re: How to do value ordering that has values that contains a specific word?</title>
      <link>https://community.jmp.com/t5/Discussions/How-to-do-value-ordering-that-has-values-that-contains-a/m-p/804612#M98229</link>
      <description>&lt;P&gt;This doesn't get the correct ordering as F10 will be before F4 and so on, but gives an idea what you could do (get two lists, order them, combine them and finally set property)&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;Names Default To Here(1);

dt = New Table("Untitled",
	Add Rows(10),
	Compress File When Saved(1),
	New Column("A",
		Character,
		"Nominal",
		Set Selected,
		Set Values({"F1", "F2", "F3", "F4 - NEW", "F5", "F6 - NEW", "F7", "F8", "F9 - NEW", "F10 - NEW"})
	)
);

l = {};
lnew = {};

For Each Row(dt,
	If(Ends With(:A, "- NEW"),
		Insert Into(lnew, :A);
	,
		Insert Into(l, :A)
	);
);

final = Sort List(l) || Sort List(lnew);

Eval(EvalExpr(
	Column(dt, "A") &amp;lt;&amp;lt; Set Property("Value Order",
		{Custom Order(Expr(final)), Common Order(0)}
	);
));
&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="jthi_0-1728538471886.png" style="width: 400px;"&gt;&lt;img src="https://community.jmp.com/t5/image/serverpage/image-id/68975i89CEA7DE7F1E1BFC/image-size/medium?v=v2&amp;amp;px=400" role="button" title="jthi_0-1728538471886.png" alt="jthi_0-1728538471886.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 10 Oct 2024 05:35:31 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/How-to-do-value-ordering-that-has-values-that-contains-a/m-p/804612#M98229</guid>
      <dc:creator>jthi</dc:creator>
      <dc:date>2024-10-10T05:35:31Z</dc:date>
    </item>
  </channel>
</rss>

