Choose Language Hide Translation Bar
Highlighted
kom
kom
Level III

Is there a (simple) way to prevent the accidental deletion of a script?

Hi all,

I have a simple script set up to generate multiple charts for Operators (upon manual entry of data into a data table).

On a couple of occasions, the Operators have accidentally deleted the entire script function.

Does anyone know of a simple way to 'lock' and prevent the accidental deletion of the 'play button' in a Data Table?

 

kom_1-1591611127134.png

 

7 REPLIES 7
Highlighted

Re: Is there a (simple) way to prevent the accidental deletion of a script?

A simple way might involve training the operators about the importance of the script and the integrity of the data table. Do you know how they delete the script? Do they right-click on the script and select Delete?

 

You could write another script that repairs the damaged data table by adding the table script back to the data table.

 

Another simple way would be to move the script to a new location. You could add a menu command or a button on a toolbar or create an add-in for the script. It would still be possible to be deleted but much more unlikely for a script saved this way, unless the operator were attempting to sabotage the script.

Learn it once, use it forever!
Highlighted
kom
kom
Level III

Re: Is there a (simple) way to prevent the accidental deletion of a script?

Thanks Mark. The deletion definitely isn't malicious, and they've already been informed on the importance of the script, but somehow they manage to get distracted, click the wrong button,  or whatever. I was hoping there would be a simple 'lock' function to protect from deletion, but I'm guessing not. Many thanks for your suggestions though.

 

Regards,

Kieran

Highlighted

Re: Is there a (simple) way to prevent the accidental deletion of a script?

Hi,

 

Just to elaborate on Mark's suggestion, one option might be to save all the scripts in an add-in, so that if the scripts accidentally get deleted they can be reset easily.  Is that helpful?

dt=Current Data Table();

dt<<Delete Scripts("Script 1","Script 2","Script 3");
dt<<New Script("Script 1",Script 1); dt<<New Script("Script 2", Script 2);
dt<<New Script("Script 3", Script 3);

 

Highlighted
txnelson
Super User

Re: Is there a (simple) way to prevent the accidental deletion of a script?

My suggestion is to create a JMP Addin that recreates the scripts. That way, the operators can even run the Addin if the scripts disappear.
Jim
Highlighted
kom
kom
Level III

Re: Is there a (simple) way to prevent the accidental deletion of a script?

Thanks for your Add-In suggestion Jim. Overall (based on all responses so far), it looks like it's not possible to prevent accidental deletion, but it is possible to minimize the effort required to re-instate the script (after accidental deletion).

Highlighted
kom
kom
Level III

Re: Is there a (simple) way to prevent the accidental deletion of a script?

Thanks Hadley, but I had hoped to prevent deletion (as oppose to finding a way to re-instate after deletion). 

Highlighted

Re: Is there a (simple) way to prevent the accidental deletion of a script?

My idea was to move the original script from the data table to a menu command, toolbar button, or add-in where it is unlikely to be deleted. I was not suggesting a second script to re-instate the first script in the data table.

Learn it once, use it forever!