funny issue with column namesI was wondering about a script that did not do what it was supposed to do - not at all!!
Just open the attached data table and run the script: THE_BUG
Caption(
"column \!"File Name\!"
values: " || Char((current data table():file Name << Get values));
)
The result is surprising:

Why not "A" and "B" ?

One can easily fix the script ...
But digging deeper, there is a quite surprising root cause ...
please enjoy : )
Automation and ScriptingRe: Nasty issue with table namesI am confused. This is what I get using JMP 18.1.0:

Am I missing something?
Re: Nasty issue with table namesSorry, while updating the post, I accidentally removed the root cause.
Now the miracle works again ...
Re: Nasty issue with table namesIn the original data table you might have gotten

View more...My guess is that it is caused by using translated column name and same name in other column + relying on JMP's loose name rules (file Name instead of File Name for column referencing)
New Table("where_is_the_bug",
Add Rows(2),
Compress File When Saved(1),
New Script(
"THE BUG", JSL Quote(Caption(
"column \!"File Name\!"
name: "|| (current data table():file Name << Get Name)||"
values: " || Char((current data table():file Name << Get values));
)
) ,
As String(1)
),
New Column("File Name",
Character,
"Nominal",
Compact(),
Set Values({"A", "B"}),
Set Display Width(71)
),
New Column(["de" => "Dateiname", "en" => "File Name"],
Character,
"Nominal",
Compact(),
Set Selected,
Set Values({"C", "C"}),
Set Display Width(83)
)
)
Most definitely a bug considering JMP's rules for names but there are easy workarounds.
Re: Nasty issue with table namesMore than a guess : )
It's interesting ...
- that JMP keeps the column name "File Name" internally for the second column - despite the conflict with the other column
just save the table script and you will see something like in @jthi 's post - that JMP uses this internal name to find the column - although the "File Name 2" in the table view
besides "file Name", you can also access the column via "File Name 2" - that JMP first scans the localized column names - and THEN the original column names (otherwise it would find the first column).
The sequence seems to be:
1) column name a: just exact matches
2) localized column names - even approximate matches
3) column name b: approximate matches - where the additional column came from.
I tried Concatenate and Update - with English and German settings ... with JMP 18.1 and JMP19EA4.
Re: Nasty issue with table namesAs a consequence - a JSL code is very "fragile" if a column name is written slight different to the actual column name:
Somebody can add a new column with alternative values. If one of the localized names is similar to the original column name/ the reference in the script JMP will prioritize the new column. This can lead to surprising plots - maybe less obvious ones than this one:
<- Graph Builder will use this one
column name: weight
JSL script: Weight
alternative column (at the end of the table): wEiGhT <- Graph Builder will use this one

dt = Open("$SAMPLE_IMPORT_DATA/Bigclass.xlsx");
expr = Expr(dt << Graph Builder(
Size( 437, 413 ),
Graph Spacing( 4 ),
Variables( X( :height ), Y( :Weight ), Overlay( :sex ) ),
Elements( Points( X, Y, Legend( 1 ) ), Smoother( X, Y, Legend( 2 ) ) )
));
expr;
Wait(1);<BR />
caption("and with some magic ...");
New Column( ["x-id" => "wEiGhT", "en" => "innocent column"], Set Values( 100::61) );
expr;
Re: Nasty issue with table namesUsing the data table that @hogi supplied, it get the blank values that were originally shown. I then noticed that there is a column called File Name 2 that has blank values for the 2 rows. I then deleted the column File Name 2 and reran the script, and the script displayed

If you change the name of the column File Name 2 the script will also run correctly