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.
pauldeen_0-1789654679720.pngpauldeen_0-1789654679720.pngpauldeen_0-1789654679720.png
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></GETDATATYPE>
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.
pauldeen_1-1789654714335.pngpauldeen_1-1789654714335.pngpauldeen_1-1789654714335.png
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.
Here is a community post about the differences between Column and As Column:
Column() vs As Column() vs datable:column vs dt:As name("column")
Think of Column() as the object that has properties like value color, specs etc. As Column() means: give me the value of the current row - this is what is needed in formulas.
Formulas actually need As Column(), not column().
Are you OK with a workaround that uses As Column() instead of Column()?
dt = Open( "$SAMPLE_DATA/Cars.jmp" );
ColList = {};
For(i=1, i<=NCols(), i++,
If(Column(i)<<GETDATATYPE></GETDATATYPE>Sometimes, Column () is used in Formulas.
e.g. if you want to check if a value is in spec. Then a quite complicated structure is needed to ask the column() [the one with the column properties] for the spec and to compare the value of the current row (as column()) with this spec.
If column() is used as an alternative for as column(), such functions won't work anymore.
On the other hand - for the question is in spec?, I hope that JMP 2027 will provide a helper function to facilitate such calculations.
:folded_hands: is in spec (value)