overview
When you use the JMP Scripting Language (JSL) to set column properties in a script, it is important to understand that a column is simply a repository for all column properties. The column does not evaluate or validate the arguments you provide, but stores the values you provide in the column properties. To populate column properties using JSL code that contains variables, the script must convert the variables to actual values.
One way to do this is with an expression. In the example below, the Eval Expr() function evaluates the variable inside the Expr() function and substitutes its value. The outer Eval() function evaluates the entire statement after the substitutions have been made.
procedure
In a JMP session, click the File menu and select New > JSL Script (prior to JMP 17, select New > Script). Copy the following script and paste it into the script window. To run the example script, click the Edit menu and select Run Script.
/* サンプルのデータテーブルを開きます。 */
dt = Open( "$SAMPLE_DATA\Big Class.jmp" );
/* 期待する仕様限界の値を割り当てます。 */
lLimit = 55;
uLimit = 70;
tLimit = 62.5;
/* 列プロパティの「仕様限界」に限界値を保存します。 */
Eval( //置換が行われた後、式全体を評価します。
Eval Expr( //Expr()関数の中にある変数を評価し、その値で置換します。
:”身長(インチ)”n << Set Property(
"Spec Limits",
{LSL( Expr( lLimit ) ), USL( Expr( uLimit ) ), Target( Expr( tLimit ) ), Show Limits( 0 )}
)
)
);
Additional Documentation
For more information about the JMP scripting language, see the JMP Scripting Guide , which you can access by clicking Help on the JMP menu and selecting JMP Online Help (JMP Help in JMP 17 and earlier). From the online help contents list, select Scripting Guide.
Note: This FAQ is based on the following JMP Note:
JMP Note 575399 - How to script Column Properties using variables