cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
  • Don’t miss your chance to experience Discovery Summit Europe at our best available rate! Early bird registration through 31 Oct.
  • Graph Builder Toolbar streamlines interactive graphing. Creates shortcuts on Report and GraphBuilder Helpers toolbars. Download and install the extension.
  • JMP will suspend normal business operations for our Rest and Recharge Day on Friday, October 2, 2026.
    Regular business hours will resume on Monday, October 5, 2026.

Discussions

Solve problems, and share tips and tricks with other JMP users.
Choose Language Hide Translation Bar
mysteriouskrypt
Level III

How to Use a Variable for Custom Value Order in JMP Scripting?

Hi everyone,

I'm trying to set a custom value order in a column using JSL. Here's the code that works when I hardcode the list:

 

TestTable:Origin << Set Property(
"Value Order",
{Custom Order({"EU", "IND", "US", "JPN", "AU"}), Common Order(0)}
);

 

However, when I try to pass the list as a variable, it doesn't work:

countriesOrder = {"EU", "IND", "US", "JPN", "AU"};
TestTable:Origin << Set Property(
"Value Order",
{Custom Order(countriesOrder), Common Order(0)}
);

 

My goal is to read the country order from an Excel file and use that list dynamically. But I can't find documentation on what Custom Order() accepts—whether it can take a variable or only a literal list.

 

1 ACCEPTED SOLUTION

Accepted Solutions
txnelson
Super User

Re: How to Use a Variable for Custom Value Order in JMP Scripting?

A variable within a JMP list will not be evaluated unless forced.  Try this

countriesOrder = {"EU", "IND", "US", "JPN", "AU"};
Eval(
	Eval Expr(
		TestTable:Origin << Set Property(
			"Value Order",
			{Custom Order( Expr( countriesOrder ) ), Common Order( 0 )}
		)
	)
);
Jim

View solution in original post

1 REPLY 1
txnelson
Super User

Re: How to Use a Variable for Custom Value Order in JMP Scripting?

A variable within a JMP list will not be evaluated unless forced.  Try this

countriesOrder = {"EU", "IND", "US", "JPN", "AU"};
Eval(
	Eval Expr(
		TestTable:Origin << Set Property(
			"Value Order",
			{Custom Order( Expr( countriesOrder ) ), Common Order( 0 )}
		)
	)
);
Jim

Recommended Articles