☑ 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?
When a user renames a column, Table Scripts get automatically updated.
When a user deletes a column which is used in a table script, JMP warns the user if the column is used in column formulas.
But a table script will die without notice.
a) it takes a long time for the user to find out why the table script is dead.
b) it takes some effort to create the column again (worst case: not possible to create the column again)
What is the improvement you would like to see?
Before deleting a column, please check if the column is used in a table script - and show a warning.
Names Default To Here( 1 );
Current Data Table() << copy table script( "no data" );
tableScript = Eval( Eval Expr( Parse( Expr( Get Clipboard() ) ) ) );
col_names = Current Data Table() << Get Selected Columns();
tableScriptList = Substitute( Name Expr( tableScript ), Expr( New Table() ), Expr( List() ) );
tableScriptList = Filter Each( {part}, tableScriptList, Head( Part ) == Expr( New Script() ) );
found = 0;
For Each( {col}, col_names,
For Each( {myScript}, tableScriptList,
If( Not( Is Empty( Eval( Eval Expr( Extract Expr( myScript, Expr( Name Expr( col ) ) ) ) ) ) ),
Caption( {100, 200}, "column \!"" || (col << get name()) || "\!" found in script: \!n" || Arg( myScript, 1 ) );
found = 1;
print("found!!!");
Wait( 1 );
)
)
);
If( Not( found ),
Caption( {100, 200}, "no column found.\!N ->cols can be deleted" );
Wait( 1 );
);
Caption( remove )
Why is this idea important?
Just imagine how many JMP users killed a table script by "accidentally" deleting a column.
switching to "safe mode" will safe many users from the same issue.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.