cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Choose Language Hide Translation Bar

Test if data table is locked

Currently there does not seem to be any method to test if a table is locked if it has been locked either through the red triangle drop down or the Lock Data Table() function. 

 

When a data table is locked either through the drop down or in JSL with dt<<Lock Data Table(1); testing to see if the table is locked using dt<< Get Edit Lock(); returns Empty(), which doesn't make sense. My expectation is that it should return a list: {"Modify Cells", "Add Rows", "Delete Rows", "Add Columns", "Delete Columns"}. 

7 Comments
gzmorgan0
Super User (Alumni)

I have a kludge work around. 

 

dt = current data table();
lock=0;
Try( dt << New Column( "Test Lock"); dt << Delete Columns("Test Lock"), lock=1);     

show(lock);
MarkDayton
Level IV

 Thanks gz. I like the kludge, but JMP should still fix the unexpected behavior.

Audrey_Shull
Staff

Thanks for the suggestion and workarounds. This is being imlemented now and i can report that i've seen it working in the major version of JMP (16) currently under development. We appreciate the suggestion!

Audrey

Jeff_Perkinson
Community Manager
Status changed to: Yes, Stay Tuned!
 
Jeff_Perkinson
Community Manager
Status changed to: Delivered

With the release of JMP 16 the Get Edit Lock message now returns a list as suggested above.

2021-03-31_13-54-39.249.png

MarkDayton
Level IV

Thanks. I'll have to play with that

 

MarkDayton
Level IV

Does not work unless Set Edit Lock() is used first. If Get Edit Lock is run on a data table that was already locked when it was opened, or locked through the red triangle button, Get Edit Lock() returns Empty().