how to put a list into a table cell under a columnHi,
I created variables that are list. I want to create new column that under if statement will fill up the cell with those variables. So I can get table as below. How can I add list into a cell?

A={"96", "104", "112", "120"};
B={"1", "100", "111", "121"};
C={"6", "14", "112", "129"};
D={"9", "124", "132", "160"};
dt << New column("Value", Expression, formula(
if (
:Mode=="A" , A,
:Mode=="B" , B,
:Mode=="C" , C,
:Mode=="D" , D,
)Advanced Statistical ModelingMass CustomizationRe: how to put a list into a table cell under a columnHi Jim,
Your are right. I 'm not sure what was the problem that it wasn't working previously. It works after I close JMP and reopen it.
Re: how to put a list into a table cell under a columnBesides missing few closing brackets and having extra , I don't see issues with the script as @txnelson also said
Names Default To Here(1);
dt = New Table("Untitled",
Add Rows(5),
Compress File When Saved(1),
Set Header Height(46),
New Column("Mode", Character, "Nominal", Set Values({"A", "C", "A", "A", "D"}))
);
A = {"96", "104", "112", "120"};
B = {"1", "100", "111", "121"};
C = {"6", "14", "112", "129"};
D = {"9", "124", "132", "160"};
dt << New Column("Value",
Expression,
formula(
If(
:Mode == "A", A,
:Mode == "B", B,
:Mode == "C", C,
:Mode == "D", D
)
)
);
If you need to have a formula and not values in those cells, I would suggest checking out Insert one expression into another using Eval Insert, Eval Expr, Parse, and Substitute as it will most likely prevent some issues which might occur.
Re: how to put a list into a table cell under a columnYour code works fine for me

Names Default To Here( 1 );
dt = Current Data Table();
A = {"96", "104", "112", "120"};
B = {"1", "100", "111", "121"};
C = {"6", "14", "112", "129"};
D = {"9", "124", "132", "160"};
dt << New Column( "Value",
Expression,
formula(
If(
:Mode == "A", A,
:Mode == "B", B,
:Mode == "C", C,
:Mode == "D", D
)
)
);