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: 11/29/2021

Prevent Changes to a Data Table

To prevent any changes to the data table (such as changing column names, changing the data type, deleting rows, and so on), use 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).