<?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: value ordering - using JSL to set column properties in Discussions</title>
    <link>https://community.jmp.com/t5/Discussions/value-ordering-using-JSL-to-set-column-properties/m-p/331583#M58035</link>
    <description>&lt;P&gt;How about this one. I'm stuck in Set Property for Spec Limits. Thanks for your help&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;for (r = 1, r &amp;lt;= N Rows(spectable), r++,
    specname = spectable:Description[r];

   	try(
        dtcol = Column(datatable, specname);
	,
		//write("No data for \!"" || specname|| "\!"");
		Continue()
	);

	//write("Setting spec for \!"" || specname|| "\!"\!r");

    if(not(ismissing(spectable:LSL[r])) | not(ismissing(spectable:USL[r])),
		eval(substitute(expr(dtcol &amp;lt;&amp;lt; Set Property("Spec Limits", {LSL(_L), USL(_U), Show Limits(1)})),
			expr(_L), spectable:LSL[r],
			expr(_U), spectable:USL[r]
		));
	);
	
	if(spectable:Units[r] != "",
		eval(substitute(expr(dtcol &amp;lt;&amp;lt; Set Property("Units", _U)),
			expr(_U), spectable:Units[r]
		));
	);

	progress = floor((r / N Rows(spectable)) * 100);
   	dlgStatus[FrameBox(1)] &amp;lt;&amp;lt; Add Graphics Script({Fill Color("blue"),Rect(0,1,progress,0,1)});
  	wait(0.001);
);&lt;/CODE&gt;&lt;/PRE&gt;</description>
    <pubDate>Tue, 10 Nov 2020 08:46:30 GMT</pubDate>
    <dc:creator>JeffO</dc:creator>
    <dc:date>2020-11-10T08:46:30Z</dc:date>
    <item>
      <title>value ordering - using JSL to set column properties</title>
      <link>https://community.jmp.com/t5/Discussions/value-ordering-using-JSL-to-set-column-properties/m-p/298414#M55861</link>
      <description>&lt;P&gt;Hi&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I need some scripting advice as there were changes in the column properties from JMP14 to JMP15 regarding the value ordering - introducing "custom order"&lt;/P&gt;&lt;P&gt;The following script works fine in JMP 14 and the result can be seen checking the column properties&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;Summarize( g = by( :BatchVO ), m = Mean( :name("Timestamp") ) );
// JMP 14 Script for value ordering column "BatchVO" in the Order of the values in column "Timestamp"
:BatchVO &amp;lt;&amp;lt; Set Property( "Value Ordering", Eval( g[Rank Index( m )] ) );&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="mlo1_0-1599138082662.png" style="width: 400px;"&gt;&lt;img src="https://community.jmp.com/t5/image/serverpage/image-id/26590iA90FC5C7455C3BA8/image-size/medium?v=v2&amp;amp;px=400" role="button" title="mlo1_0-1599138082662.png" alt="mlo1_0-1599138082662.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;The script above works in JMP15 but the result is not visible in the column properties - I guess - due to the new "custom order"&lt;/P&gt;&lt;P&gt;Does anyone knows how to change this to get it working &lt;STRONG&gt;and&lt;/STRONG&gt; the result visible in the column properties in JMP15?&lt;/P&gt;&lt;P&gt;The following does not work.&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;Summarize( g = by( :BatchVO ), m = Mean( :name("Timestamp") ) );

//JMP15 Script
:BatchVO &amp;lt;&amp;lt; Set Property( "Value Order",  {Custom Order(Eval( g[Rank Index( m )] ))} );&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;Any ideas about the correct JSL script for JMP15 and above?&lt;/P&gt;&lt;P&gt;&lt;a href="https://community.jmp.com/t5/user/viewprofilepage/user-id/2742"&gt;@martindemel&lt;/a&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sat, 10 Jun 2023 23:18:33 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/value-ordering-using-JSL-to-set-column-properties/m-p/298414#M55861</guid>
      <dc:creator>mlo1</dc:creator>
      <dc:date>2023-06-10T23:18:33Z</dc:date>
    </item>
    <item>
      <title>Re: value ordering - using JSL to set column properties</title>
      <link>https://community.jmp.com/t5/Discussions/value-ordering-using-JSL-to-set-column-properties/m-p/298454#M55865</link>
      <description>&lt;P&gt;The values returned from your Summarize for the "g" variable are returned as character strings, and you are attempting to apply character string values to a numeric column&lt;/P&gt;
&lt;P&gt;The code below appears to do what you want&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;names default to here(1);
Summarize( g = by( :BatchVO ), m = Mean( :name("Timestamp") ) );

for(i=1,i&amp;lt;=nitems(g),i++,
	g[i]=num(g[i])
);

//JMP15 Script
eval(substitute(expr(:BatchVO &amp;lt;&amp;lt; Set Property( "Value Order",  {Custom Order(__list__)} );),
expr(__list__), g[Rank Index( m )] ));&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Thu, 03 Sep 2020 14:13:43 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/value-ordering-using-JSL-to-set-column-properties/m-p/298454#M55865</guid>
      <dc:creator>txnelson</dc:creator>
      <dc:date>2020-09-03T14:13:43Z</dc:date>
    </item>
    <item>
      <title>Re: value ordering - using JSL to set column properties</title>
      <link>https://community.jmp.com/t5/Discussions/value-ordering-using-JSL-to-set-column-properties/m-p/298597#M55873</link>
      <description>Thank you very much.&lt;BR /&gt;Now it is visible in the column properties menu - great.</description>
      <pubDate>Thu, 03 Sep 2020 14:43:38 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/value-ordering-using-JSL-to-set-column-properties/m-p/298597#M55873</guid>
      <dc:creator>mlo1</dc:creator>
      <dc:date>2020-09-03T14:43:38Z</dc:date>
    </item>
    <item>
      <title>Re: value ordering - using JSL to set column properties</title>
      <link>https://community.jmp.com/t5/Discussions/value-ordering-using-JSL-to-set-column-properties/m-p/331583#M58035</link>
      <description>&lt;P&gt;How about this one. I'm stuck in Set Property for Spec Limits. Thanks for your help&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;for (r = 1, r &amp;lt;= N Rows(spectable), r++,
    specname = spectable:Description[r];

   	try(
        dtcol = Column(datatable, specname);
	,
		//write("No data for \!"" || specname|| "\!"");
		Continue()
	);

	//write("Setting spec for \!"" || specname|| "\!"\!r");

    if(not(ismissing(spectable:LSL[r])) | not(ismissing(spectable:USL[r])),
		eval(substitute(expr(dtcol &amp;lt;&amp;lt; Set Property("Spec Limits", {LSL(_L), USL(_U), Show Limits(1)})),
			expr(_L), spectable:LSL[r],
			expr(_U), spectable:USL[r]
		));
	);
	
	if(spectable:Units[r] != "",
		eval(substitute(expr(dtcol &amp;lt;&amp;lt; Set Property("Units", _U)),
			expr(_U), spectable:Units[r]
		));
	);

	progress = floor((r / N Rows(spectable)) * 100);
   	dlgStatus[FrameBox(1)] &amp;lt;&amp;lt; Add Graphics Script({Fill Color("blue"),Rect(0,1,progress,0,1)});
  	wait(0.001);
);&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Tue, 10 Nov 2020 08:46:30 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/value-ordering-using-JSL-to-set-column-properties/m-p/331583#M58035</guid>
      <dc:creator>JeffO</dc:creator>
      <dc:date>2020-11-10T08:46:30Z</dc:date>
    </item>
    <item>
      <title>Re: value ordering - using JSL to set column properties</title>
      <link>https://community.jmp.com/t5/Discussions/value-ordering-using-JSL-to-set-column-properties/m-p/331620#M58045</link>
      <description>&lt;P&gt;After I commented out your Add Graphics Code line(you did not include the dlgStatus object) your code worked fine for my sample data.&amp;nbsp; So if it does not work for your code, I suspect there is a mismatch between the name of the columns in your datatable and the description column in your spectable.&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;Names Default To Here( 1 );
datatable = Open( "$SAMPLE_DATA/big class.jmp" );
spectable = New Table( "specs",
	Add Rows( 2 ),
	New Column( "Description", Character, "Nominal", Set Values( {"height", "weight"} ) ),
	New Column( "LSL", Numeric, "Continuous", Format( "Best", 12 ), Set Values( [52, 61] ) ),
	New Column( "USL", Numeric, "Continuous", Format( "Best", 12 ), Set Values( [70, 175] ) ),
	New Column( "Units", Character, "Nominal", Set Values( {"Inches", "Pounds"} ), Set Display Width( 56 ) )
);

For( r = 1, r &amp;lt;= N Rows( spectable ), r++,
	specname = spectable:Description[r];

	Try(
		dtcol = Column( datatable, specname ), 
		//write("No data for \!"" || specname|| "\!"");
		Continue()
	);

	//write("Setting spec for \!"" || specname|| "\!"\!r");

	If( Not( Is Missing( spectable:LSL[r] ) ) | Not( Is Missing( spectable:USL[r] ) ),
		Eval(
			Substitute(
					Expr(
						dtcol &amp;lt;&amp;lt; Set Property( "Spec Limits", {LSL( _L ), USL( _U ), Show Limits( 1 )} )
					),
				Expr( _L ), spectable:LSL[r],
				Expr( _U ), spectable:USL[r]
			)
		)
	);
	
	If( spectable:Units[r] != "",
		Eval( Substitute( Expr( dtcol &amp;lt;&amp;lt; Set Property( "Units", _U ) ), Expr( _U ), spectable:Units[r] ) )
	);

	progress = Floor( (r / N Rows( spectable )) * 100 );
	//dlgStatus[FrameBox( 1 )] &amp;lt;&amp;lt; Add Graphics Script( {Fill Color( "blue" ), Rect( 0, 1, progress, 0, 1 )} );
	Wait( 0.001 );
);&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Tue, 10 Nov 2020 12:07:19 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/value-ordering-using-JSL-to-set-column-properties/m-p/331620#M58045</guid>
      <dc:creator>txnelson</dc:creator>
      <dc:date>2020-11-10T12:07:19Z</dc:date>
    </item>
    <item>
      <title>Re: value ordering - using JSL to set column properties</title>
      <link>https://community.jmp.com/t5/Discussions/value-ordering-using-JSL-to-set-column-properties/m-p/332094#M58074</link>
      <description>&lt;P&gt;Can you help me on this.. it is working fine using V13 but when I upgrade to V15 still prompt an error in setting specs limits.&lt;/P&gt;&lt;P&gt;btw, function of this is to merge 2 or more csv file using 3rd to 5th row as specs. Thanks!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 11 Nov 2020 00:32:23 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/value-ordering-using-JSL-to-set-column-properties/m-p/332094#M58074</guid>
      <dc:creator>JeffO</dc:creator>
      <dc:date>2020-11-11T00:32:23Z</dc:date>
    </item>
    <item>
      <title>Re: value ordering - using JSL to set column properties</title>
      <link>https://community.jmp.com/t5/Discussions/value-ordering-using-JSL-to-set-column-properties/m-p/332095#M58075</link>
      <description>What is the error message in the log?</description>
      <pubDate>Wed, 11 Nov 2020 01:27:54 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/value-ordering-using-JSL-to-set-column-properties/m-p/332095#M58075</guid>
      <dc:creator>txnelson</dc:creator>
      <dc:date>2020-11-11T01:27:54Z</dc:date>
    </item>
    <item>
      <title>Re: value ordering - using JSL to set column properties</title>
      <link>https://community.jmp.com/t5/Discussions/value-ordering-using-JSL-to-set-column-properties/m-p/332110#M58078</link>
      <description>&lt;P&gt;See attached error message.&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="Error.PNG" style="width: 387px;"&gt;&lt;img src="https://community.jmp.com/t5/image/serverpage/image-id/28250i4707649537D9D433/image-size/large?v=v2&amp;amp;px=999" role="button" title="Error.PNG" alt="Error.PNG" /&gt;&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 11 Nov 2020 16:21:20 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/value-ordering-using-JSL-to-set-column-properties/m-p/332110#M58078</guid>
      <dc:creator>JeffO</dc:creator>
      <dc:date>2020-11-11T16:21:20Z</dc:date>
    </item>
    <item>
      <title>Re: value ordering - using JSL to set column properties</title>
      <link>https://community.jmp.com/t5/Discussions/value-ordering-using-JSL-to-set-column-properties/m-p/332130#M58080</link>
      <description>The column that you are trying to apply Spec Limits to is of  a character data type., You need to change it to numeric.</description>
      <pubDate>Wed, 11 Nov 2020 03:09:20 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/value-ordering-using-JSL-to-set-column-properties/m-p/332130#M58080</guid>
      <dc:creator>txnelson</dc:creator>
      <dc:date>2020-11-11T03:09:20Z</dc:date>
    </item>
    <item>
      <title>Re: value ordering - using JSL to set column properties</title>
      <link>https://community.jmp.com/t5/Discussions/value-ordering-using-JSL-to-set-column-properties/m-p/412065#M66160</link>
      <description>&lt;P&gt;Hi Jim, I am dealing with similar issue with value ordering format in script; I need to be able to uncheck the customer order and keep it in Row order leve per data table. your help is greatly appreciated&lt;/P&gt;
&lt;P&gt;Here is the script portion where I select the columns to to be stacked.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;dt = Current Data Table();
dt1 = Data Table( dt ) &amp;lt;&amp;lt; Stack(
    columns( :Data Target, :Data1, :Data2, :Data3, :Data4, :Data5, :Best Data, ),
    Source Label Column( "Label" ),
    Stacked Data Column( "Data" ),
    Drop All Other Columns( 1 ), 
);&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;When I run my script I get the graph with data sorted alphabetically see pic1 where it shows Best data on the left&lt;/P&gt;
&lt;P&gt;I want to have the value order in such way that&lt;/P&gt;
&lt;P&gt;1) I could un-select the Customer order box&lt;/P&gt;
&lt;P&gt;2) Check the Row Order Levels&lt;/P&gt;
&lt;P&gt;this way the graph come the same order in the stack table as pic 2 where the Data target on on far left of the graph.&lt;/P&gt;
&lt;P&gt;Thanks&lt;/P&gt;
&lt;P&gt;Sam&lt;/P&gt;</description>
      <pubDate>Tue, 24 Aug 2021 14:26:01 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/value-ordering-using-JSL-to-set-column-properties/m-p/412065#M66160</guid>
      <dc:creator>SamD</dc:creator>
      <dc:date>2021-08-24T14:26:01Z</dc:date>
    </item>
    <item>
      <title>Re: value ordering - using JSL to set column properties</title>
      <link>https://community.jmp.com/t5/Discussions/value-ordering-using-JSL-to-set-column-properties/m-p/412068#M66161</link>
      <description>&lt;P&gt;pic1&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="SamD_0-1629765518622.png" style="width: 400px;"&gt;&lt;img src="https://community.jmp.com/t5/image/serverpage/image-id/35288i6E7BA955BA402666/image-size/medium?v=v2&amp;amp;px=400" role="button" title="SamD_0-1629765518622.png" alt="SamD_0-1629765518622.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;pic2&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="SamD_1-1629765532686.png" style="width: 400px;"&gt;&lt;img src="https://community.jmp.com/t5/image/serverpage/image-id/35289i38BACC4D71B68956/image-size/medium?v=v2&amp;amp;px=400" role="button" title="SamD_1-1629765532686.png" alt="SamD_1-1629765532686.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, 24 Aug 2021 00:38:59 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/value-ordering-using-JSL-to-set-column-properties/m-p/412068#M66161</guid>
      <dc:creator>SamD</dc:creator>
      <dc:date>2021-08-24T00:38:59Z</dc:date>
    </item>
  </channel>
</rss>

