cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
  • Sign-in to the JMP Community will be unavailable intermittently Dec. 6-7 due to a system update. Thank you for your understanding!
  • We’re retiring the File Exchange at the end of this year. The JMP Marketplace is now your destination for add-ins and extensions.
  • JMP 19 is here! Learn more about the new features.

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