- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Get Direct Link
- Report Inappropriate Content
Lock the formula in a column
I am working on a standard data table with saved formulas in some columns. I know when you have a formula in a column, the data entry would be locked but is there any option to also lock the formula so the users cannot change the formula without for example having a password? Thanks for your answers in advance
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Get Direct Link
- Report Inappropriate Content
Re: Lock the formula in a column
I'm not sure how to do that, but you could evaluate the formula, then delete it then lock the column.
Names Default To Here( 1 );
dt = Open( "$SAMPLE_DATA/Big Class.jmp" );
dt << new column("Ratio", formula(:height/:weight));
:Ratio<<delete formula;
:Ratio << Lock( 1 );
...then in the SOP that governs data analysis say, if(caught editing formulas | caught editing data=1,"Fired")
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Get Direct Link
- Report Inappropriate Content
Re: Lock the formula in a column
Thanks Byron for the answer. Unfortunately, that does not work for my case because I still want to give the option to users to change the input columns and get the updated results in the column with the formula. I know there is a similar functionality in Excel that you can lock the formula with password protection.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Get Direct Link
- Report Inappropriate Content
Re: Lock the formula in a column
Building on Byron's suggestion, you could have a simple table script that rebuilds all the default formulas
Names Default To Here( 1 );
dt = Open( "$SAMPLE_DATA/Big Class.jmp" );
dt << new column("Ratio", formula(:height/:weight));
//
dt << new script( "RESET FORMULAS",
:Ratio << set formula( :height/:weight)
);
// Move new script to the top so it is easier to find
dt << move selected scripts(
{"RESET FORMULAS"},
to first
)
And if you didn't want people to adjust the RESET FORMULA script, you could always encrypt it.
https://www.jmp.com/support/help/en/18.0/index.shtml#page/jmp/encrypt-scripts-in-jmp-data-tables.sht...