Welcome to the community
With a variable specified in the formula, "J" and the changing of its value in the JSL, the columns with the variable will change as the value of "J" changes. To rectify this, one needs to evaluate the value of the variable "J" as the formula is specified to JMP.
Eval(EvalExpr()) will force the evaluation before JMP parses the code
Try this
For( j = 10, j <= 12, j++,
Eval(
Eval Expr(
New Column( "xF-C MA x " || Char( j ),
Numeric,
Formula( Col Moving Average( :"xV-C"n, 1, Expr( j - 1 ) ) )
)
)
)
);
Jim