What inspired this wish list request?
The user interface in JMP has trained me to select columns and drag those to boxes, including the formula editor. In the background those Col List Boxes generate strings that correspond to column names, but that is not how the dialogs present things., i'm dragging columns around.
The same behavior does not work in scripting:
dt = Open( "$SAMPLE_DATA/Cars.jmp" );
ColList = {};
For(i=1, i<=NCols(), i++,
If(Column(i)<<GetDataType=="Numeric", InsertInto(ColList, Column(i)))
);
MeanExpr = NameExpr(Mean());
For(i=1, i<=NItems(ColList), i++,
InsertInto(MeanExpr, ColList[i])
);
Eval(
EvalExpr(
dt << NewColumn("Average of numerics",
Formula(
Expr(NameExpr(MeanExpr))
)
)
)
);
This example generates an invalid list of Column("Name") objects which the Mean() function cannot handle. This makes working with column formula's much more difficult from a new scripter perspective than it needs to be.
See this disucssion: https://community.jmp.com/t5/Discussions/How-to-create-an-average-column-with-JSL-based-on-random-columns/m-p/968140#M110445
See support case: 00345202
What is the improvement you would like to see?
Extend all column formula functions to accept objects of type Column("Name") and internally convert them to indexable column type of style :"Name"n. That way even though technically it is a different object, it does match the UI style of dropping column's in.
All functions listed here should be augmented to accept column() type.
Why is this idea important?
It makes JSL and UI logically working the same, providing a lower barrier to entry for new scripters.
... View more