I'm currently writing a script that pulls data from a DB. I add several scripts to the datatable (not in a column, but in the script box, frame top left of the datatable).
JMP adds standard some of the scripts. One of them is 'Save To DB'. This script needs to get deleted in the script I'm writing.
I can't have the users run this script accidently. In the past we did 1 DB-update and it completely destroyed the structure of our DB (meaning other programs that connect to th DB stopped working). Therefore leaving it in is actually a big production risk (and it will happen frequently).
I can add scripts with
dt << New Script( ... );
dt << Delete Script( 'MyScript' );
Can anyone help me with this please?
Unfortunately these objects were originally known as table properties and now we call them table scripts. The message protocol to the data table is a bit confusing as a result.
See Help > Scripting Index > Objects > Data Table. Select Delete Table Property in the second list for more information. This message is the one that you are looking for.
Here's some code that deletes two table variables and one property:
current_dataset << Delete Table Variable("JSL"); current_dataset << Delete Table Variable("SQL"); current_dataset << Delete Table Property("Source");
In addition you can hide the ODBC connection string with a preference. In JSL you can do this:
pref(ODBC Hide Connection String(1));