cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
  • Learn how to build custom Python data connectors and further customize JMP’s Data Connector Framework with the Python Data Connector Demo, available now in the JMP Marketplace!
  • See how to create experiments to support product design and ID useful product features. Register for June 12 webinar, 2pm US Eastern Time.

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