cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Choose Language Hide Translation Bar

JSL Editor: Detect wrong column references and display a warning + hint

☐ cool new feature
☑ could help many users!

☑ removes something that feels like a „bug“

☐ nice to have

☐ nobody needs it

 

What inspired this wish list request? 

A task that puzzles many new Jmp user at some point:

how to create a formula column with a column reference (or a constant) that is pre-defined and stored in a variable.

Use for loop variable in a formula 

Use expr() to replace variable column names in a formula 

JSL: How to pass a variable to a column formula 

New Column Formula with JSL 

How to use a variable value in a formula 

Need help with expressions, column references, formulas and column renaming 

Creating Formula Columns in a For Loop 

Apply a formula from a list 

Adding Formula Columns based on Column Name List 

 

The good news is that an experience user can choose from a range of solutions:

Insert one expression into another using Eval Insert, Eval Expr, Parse, and Substitute

 

On the other hand, before a user gets aware of the issue, reads the manual, finds a community post or asking for help in the community, ...  he will just start with the most simple approach: use the bare column reference (or constant) within the formula.

 

Then Jmp will display an error, the column formula will not work - or the formula will not work anymore after a restart of JMP.

 

What is the improvement you would like to see? 

For an experienced user, it's very easy to identify the issue and to correct it.

 

So, maybe, a Jmp "Copilot" could detect the issue as well and guide the user to a solution,

e.g. by providing a link to Insert one expression into another using Eval Insert, Eval Expr, Parse, and Substitute

 

Is it possible to automatically correct the code?
via right click, maybe Jmp could automatically add an  Eval(Substitute(...)) which replaces a placeholder with the variable that was defined outside of the column formula.

 

Why is this idea important? 

New users will lose less time identifying the error + searching for a solution.

 

The application case of a column reference in a column formula is the most common use case, but in principle, the same Copilot could also detect and fix similar issues where variables are not evaluated before handing them over or where variables are evaluated too early before they are handed over to the next function.

 

more wishes by  hogi_2-1702196401638.png

1 Comment
hogi
Level XII

one of the most kudoed "new" wishes.

hogi_0-1727984864353.png