For the latest version of JMP Help, visit JMP.com/help.


Scripting Guide > Data Tables > Basic Data Table Scripting > Prevent Changes to a Data Table
Publication date: 07/24/2024

Prevent Changes to a Data Table

Using JSL, you can prevent any changes to the data table (such as changing column names, changing the data type, deleting rows, and so on), using Lock Data(1).

dt << Lock Data Table( 1 );

To prevent modifying adding or deleting columns and rows and modifying cells, use Set Edit Lock:

dt << Set Edit Lock( "Add Columns" );
dt << Set Edit Lock( "Delete Columns" );
dt << Set Edit Lock( "Add Rows" );
dt << Set Edit Lock( "Delete Rows" );
dt << Set Edit Lock( "Modify Cells" );

To get a list of data table operations that are locked, use Get Edit Lock:

dt << Get Edit Lock();

{"Modify Cells", "Add Rows", "Delete Rows", "Add Columns", "Delete Columns"}

To allow a specific data table operation again, use Clear Edit Lock:

dt << Clear Edit Lock( "Modify Cells" );
Want more information? Have questions? Get answers in the JMP User Community (community.jmp.com).