cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
  • New to JMP? Join us Sept. 23-24 for the Early User Edition of Discovery Summit, tailor-made for new users. Register now for free!
  • Use World Cup data to build models, explore spatial relationships, and create informative visualizations in JMP. Register. July 17, 2 pm US Eastern Time.
  • Your voice matters! Tell us how you prefer to receive JMP updates, so we can tailor our communication to your needs. Take short survey.

Discussions

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

List not evaluating in Set Property - why?

The following works  for the data table "allData"

Data Table( "allData" ):sTest << Set Property(
	"Value Order",
	{Custom Order({"IP1", "IP2", "IP3", "IP4", "IP5", "IP6"}),
	Common Order( 0 )}
);

but the following does not- where am I going wrong?

myList = {"IP1", "IP2", "IP3", "IP4", "IP5", "IP6"};
Data Table( "allData" ):sTest << Set Property(
	"Value Order",
	{Custom Order(myList),
	Common Order( 0 )}
);
When it's too good to be true, it's neither
1 ACCEPTED SOLUTION

Accepted Solutions
jthi
Super User

Re: List not evaluating in Set Property - why?

Scripting Guide > Data Structures > Lists in JSL Scripts > Evaluate Lists . One option to getting that list evaluated is to use Eval(EvalExpr())

Names Default To Here(1);

dt = New Table("Untitled",
	Add Rows(6),
	Compress File When Saved(1),
	New Column("Column 1",
		Character,
		"Nominal",
		Set Values({"IP2", "IP1", "IP3", "IP6", "IP4", "IP5"})
	)
);

mylist = {"IP2", "IP1", "IP3", "IP4", "IP5", "IP6"};
Eval(Eval Expr(
	Column(dt, "Column 1") << Set Property(
		"Value Order",
		{Custom Order(Expr(mylist)),
		Common Order( 0 )}
	);
));
-Jarmo

View solution in original post

1 REPLY 1
jthi
Super User

Re: List not evaluating in Set Property - why?

Scripting Guide > Data Structures > Lists in JSL Scripts > Evaluate Lists . One option to getting that list evaluated is to use Eval(EvalExpr())

Names Default To Here(1);

dt = New Table("Untitled",
	Add Rows(6),
	Compress File When Saved(1),
	New Column("Column 1",
		Character,
		"Nominal",
		Set Values({"IP2", "IP1", "IP3", "IP6", "IP4", "IP5"})
	)
);

mylist = {"IP2", "IP1", "IP3", "IP4", "IP5", "IP6"};
Eval(Eval Expr(
	Column(dt, "Column 1") << Set Property(
		"Value Order",
		{Custom Order(Expr(mylist)),
		Common Order( 0 )}
	);
));
-Jarmo

Recommended Articles