why ::labelslist ?Names Default to Here(1);
dt = Open( "$SAMPLE_DATA/Big Class Families.jmp" );
labelsList = {"F" = "A", "M" = "B"}; //here namespace
::labelsList = {"F" = "①", "M" = "②"}; // global variable
f = function ({},
{default local},
labelsList = {"F" = "X", "M" = "Y"} ; // local variable
dt:sex << Set Property( "Value Labels", labelsList ) // which variable will JMP pick?
);
f
JMP 19.1: ①,②
JMP 18.2.2 & JMP 20EA: X,Y
workarounds:
- use dt:sex <
- use Eval (Eval Expr( ... Expr (labelslist) ))
Automation and ScriptingRe: why ::labelslist ?much more difficult to understand was the initial error message:

delete symbols (::labelsList);
Names Default to Here(1);
dt = Open( "$SAMPLE_DATA/Big Class Families.jmp" );
f = function ({},
{default local},
labelsList = {"F" = "X", "M" = "Y"} ;
dt:sex << Set Property( "Value Labels", labelsList )
);
fRe: why ::labelslist ?Unknown means JMP caught an unexpected error and has no better explanation. Report it and explain what you think it should do; a developer will get a chance to fix it, either by making it work in a reasonable way or by making the message better.
Re: why ::labelslist ?JMP19 maybe does the evaluation in the data table which is why global value is being used. You can question should that evaluation happen at all
The column stores the column property with the values supplied without evaluation or validation of the supplied arguments. In order to add column properties that contains variables using JSL code, the script must convert any variables to their actual values. Scripting Guide > Data Tables > Work with Columns > Set or Get Column Properties .
You can also make JMP crash with JMP19 if you wrap your variable with {} (JMP18 won't crash and you will get attempt to assign error).