<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Lock the formula in a column in Discussions</title>
    <link>https://community.jmp.com/t5/Discussions/Lock-the-formula-in-a-column/m-p/802336#M97859</link>
    <description>&lt;P&gt;Building on Byron's suggestion, you could have a simple table script that rebuilds all the default formulas&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;Names Default To Here( 1 );
dt = Open( "$SAMPLE_DATA/Big Class.jmp" );
dt &amp;lt;&amp;lt; new column("Ratio", formula(:height/:weight));

//
dt &amp;lt;&amp;lt; new script( "RESET FORMULAS",
	:Ratio &amp;lt;&amp;lt; set formula( :height/:weight)
);

// Move new script to the top so it is easier to find
dt &amp;lt;&amp;lt; move selected scripts(
	{"RESET FORMULAS"},
	to first
)&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;BR /&gt;And if you didn't want people to adjust the RESET FORMULA script, you could always encrypt it.&lt;BR /&gt;&lt;A href="https://www.jmp.com/support/help/en/18.0/index.shtml#page/jmp/encrypt-scripts-in-jmp-data-tables.shtml" target="_blank"&gt;https://www.jmp.com/support/help/en/18.0/index.shtml#page/jmp/encrypt-scripts-in-jmp-data-tables.shtml&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;</description>
    <pubDate>Fri, 27 Sep 2024 15:48:50 GMT</pubDate>
    <dc:creator>scott_allen</dc:creator>
    <dc:date>2024-09-27T15:48:50Z</dc:date>
    <item>
      <title>Lock the formula in a column</title>
      <link>https://community.jmp.com/t5/Discussions/Lock-the-formula-in-a-column/m-p/781293#M96386</link>
      <description>&lt;P&gt;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&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 13 Aug 2024 12:40:40 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Lock-the-formula-in-a-column/m-p/781293#M96386</guid>
      <dc:creator>TannazTaj</dc:creator>
      <dc:date>2024-08-13T12:40:40Z</dc:date>
    </item>
    <item>
      <title>Re: Lock the formula in a column</title>
      <link>https://community.jmp.com/t5/Discussions/Lock-the-formula-in-a-column/m-p/781323#M96391</link>
      <description>&lt;P&gt;I'm not sure how to do that, but you could evaluate the formula, then delete it then lock the column.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;Names Default To Here( 1 );
dt = Open( "$SAMPLE_DATA/Big Class.jmp" );
dt &amp;lt;&amp;lt; new column("Ratio", formula(:height/:weight));
:Ratio&amp;lt;&amp;lt;delete formula;
:Ratio &amp;lt;&amp;lt; Lock( 1 );&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;...then in the SOP that governs data analysis say, &amp;nbsp;if(caught editing formulas | caught editing data=1,"Fired")&lt;/P&gt;</description>
      <pubDate>Tue, 13 Aug 2024 14:21:21 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Lock-the-formula-in-a-column/m-p/781323#M96391</guid>
      <dc:creator>Byron_JMP</dc:creator>
      <dc:date>2024-08-13T14:21:21Z</dc:date>
    </item>
    <item>
      <title>Re: Lock the formula in a column</title>
      <link>https://community.jmp.com/t5/Discussions/Lock-the-formula-in-a-column/m-p/802239#M97843</link>
      <description>&lt;P&gt;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.&amp;nbsp;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 27 Sep 2024 08:55:06 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Lock-the-formula-in-a-column/m-p/802239#M97843</guid>
      <dc:creator>TannazTaj</dc:creator>
      <dc:date>2024-09-27T08:55:06Z</dc:date>
    </item>
    <item>
      <title>Re: Lock the formula in a column</title>
      <link>https://community.jmp.com/t5/Discussions/Lock-the-formula-in-a-column/m-p/802336#M97859</link>
      <description>&lt;P&gt;Building on Byron's suggestion, you could have a simple table script that rebuilds all the default formulas&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;Names Default To Here( 1 );
dt = Open( "$SAMPLE_DATA/Big Class.jmp" );
dt &amp;lt;&amp;lt; new column("Ratio", formula(:height/:weight));

//
dt &amp;lt;&amp;lt; new script( "RESET FORMULAS",
	:Ratio &amp;lt;&amp;lt; set formula( :height/:weight)
);

// Move new script to the top so it is easier to find
dt &amp;lt;&amp;lt; move selected scripts(
	{"RESET FORMULAS"},
	to first
)&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;BR /&gt;And if you didn't want people to adjust the RESET FORMULA script, you could always encrypt it.&lt;BR /&gt;&lt;A href="https://www.jmp.com/support/help/en/18.0/index.shtml#page/jmp/encrypt-scripts-in-jmp-data-tables.shtml" target="_blank"&gt;https://www.jmp.com/support/help/en/18.0/index.shtml#page/jmp/encrypt-scripts-in-jmp-data-tables.shtml&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 27 Sep 2024 15:48:50 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Lock-the-formula-in-a-column/m-p/802336#M97859</guid>
      <dc:creator>scott_allen</dc:creator>
      <dc:date>2024-09-27T15:48:50Z</dc:date>
    </item>
  </channel>
</rss>

