cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Browse apps to extend the software in the new JMP Marketplace
Choose Language Hide Translation Bar
TannazTaj
Level I

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 

3 REPLIES 3
Byron_JMP
Staff

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")

JMP Systems Engineer, Health and Life Sciences (Pharma)
TannazTaj
Level I

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.  

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...

-Scott