How to automatically combine this complex conversion?In JSL, there is already a list variable abc. How can the values of this variable be written one by one into a new script without automatically re-entering the specific variable values
Thanks!
abc={"A","B","C","D","E"};
dt=New Table("A",Add Rows(1),New Column("A",Character,"Nominal"));
Eval(Parse("dt<<NEW script=""></NEW>

Automation and ScriptingRe: How to automatically combine this complex conversion?Is this what you are looking for?
Names Default To Here(1);
abc = {"A", "B", "C", "D", "E"};
dt = New Table("A", Add Rows(1), New Column("A", Character, "Nominal"));
Eval(EvalExpr(
dt << New Script("A",
Expr(abc)
);
));

Or do you wish to have a script which will set abc variable to the list of values within the table script?
Re: How to automatically combine this complex conversion?Thanks!
OK
Eval(EvalExpr(
dt << New Script("A",
abc=Expr(abc)
);
));Re: How to automatically combine this complex conversion?You generally have three options
Names Default To Here(1);
dt = New Table("A", Add Rows(1), New Column("A", Character, "Nominal"));
// No variable
abc = {"A", "B", "C", "D", "E"};
Eval(EvalExpr(
dt << New Script("A1",
Expr(abc)
);
));
// Freely define the variable name within table script
abc = {"A", "B", "C", "D", "E"};
Eval(EvalExpr(
dt << New Script("A2",
abc = Expr(abc)
);
));
// Use expression to define variable and it's value within table script
// If you need abc defined outside of table script, you can use Eval(abc_expr);
abc_expr = Expr(abc = {"A", "B", "C", "D", "E"});
Eval(EvalExpr(
dt << New Script("A3",
Expr(Name Expr(abc_expr))
);
));Re: How to automatically combine this complex conversion?How can do it
Thanks Experts!
dt = New Table("A", Add Rows(1), New Column("A", Character, "Nominal"));
xx=1.3;
:A<<ADD column="" properties=""></ADD>

Re: How to automatically combine this complex conversion?I want get:
dt=Current Data Table();
abc=1.3;
Re: How to automatically combine this complex conversion?The JSL Quote() required for the Event Handler makes things more difficult. I'm not sure there's another way than to Parse() it.
dt = New Table( "A", Add Rows( 1 ), New Column( "A", Character, "Nominal" ) );
xx = 1.3;
Eval(
Parse(
"\[:A << Add Column Properties(
Set Property(
"Event Handler",
Event Handler(
Click(JSL Quote(Function( {thisTable, thisColumn, iRow}, {},
dt=Current Data Table();
abc=]\"
|| Char( xx ) || ";
);) )
)
)
);"
)
);

Re: How to automatically combine this complex conversion?Thanks Experts!
However, the event response link in column B was not created successfully
Thanks!
dt = New Table( "A", Add Rows( 1 ), New Column( "A", Character, "Nominal" ), New Column( "B", Character, "Nominal" ), New Column( "C", Character, "Nominal" ), New Column( "D", Character, "Nominal" ) );
xx = 1.3;yy="two";
Eval(Parse("\[:A << Add Column Properties(Set Property("Event Handler",Event Handler(Click(JSL Quote(Function( {thisTable, thisColumn, iRow}, {},
dt=Current Data Table();
abc=]\"
|| Char( xx ) ||
"\[; );)))));]\"));
Eval(Parse("\[:B<< Add Column Properties(Set Property("Event Handler",Event Handler(Click(JSL Quote(Function( {thisTable, thisColumn, iRow}, {},
dt=Current Data Table();dt[1,"A"]="one"
dt[1,"C"]=]\"|| yy || "\[;
dt[1,"D"]="th"
);)))));
]\"));Re: How to automatically combine this complex conversion?It does give you error message
Unexpected "dt". Perhaps there is a missing "," or ")".
Trying to parse arguments of function "Function".
Line 3 Column 1: ►dt[1,"C"]=two;
Indicating that something is most likely wrong with the syntax. In this case it seems like you are missing ";" after "one"
Re: How to automatically combine this complex conversion?Thanks!
Eval(Parse("\[:B<< Add Column Properties(Set Property("Event Handler",Event Handler(Click(JSL Quote(Function( {thisTable, thisColumn, iRow}, {},
dt=Current Data Table();dt[1,"A"]="one";
dt[1,"C"]="]\"|| yy || "\[";
dt[1,"D"]="th"
);)))));
]\"));