cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
  • JMP will suspend normal business operations for our Winter Holiday beginning on Wednesday, Dec. 24, 2025, at 5:00 p.m. ET (2:00 p.m. ET for JMP Accounts Receivable).
    Regular business hours will resume at 9:00 a.m. EST on Friday, Jan. 2, 2026.
  • We’re retiring the File Exchange at the end of this year. The JMP Marketplace is now your destination for add-ins and extensions.

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