cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Try the Materials Informatics Toolkit, which is designed to easily handle SMILES data. This and other helpful add-ins are available in the JMP® Marketplace
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