<?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: Formulas in data table not re-evaluating in Discussions</title>
    <link>https://community.jmp.com/t5/Discussions/Formulas-in-data-table-not-re-evaluating/m-p/246225#M48369</link>
    <description>&lt;P&gt;I cannot test it but I think that this approach might work:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;Eval(
	Substitute(
		Expr(
			nnn &amp;lt;&amp;lt; Set Formula(
				If(
					ccc &amp;gt; uuu,
						"High", 
					ccc &amp;lt; lll,
						"Low",
					"OK"
				)
			)
		),
		Expr( nnn ), Column( Concat( columnName, " Spec" ) ),
		Expr( ccc ), Column( columnName ),
		Expr( lll ), LSL,
		Expr( uuu ), USL
		)
	)
);&lt;/CODE&gt;&lt;/PRE&gt;</description>
    <pubDate>Thu, 06 Feb 2020 13:37:32 GMT</pubDate>
    <dc:creator>Mark_Bailey</dc:creator>
    <dc:date>2020-02-06T13:37:32Z</dc:date>
    <item>
      <title>Formulas in data table not re-evaluating</title>
      <link>https://community.jmp.com/t5/Discussions/Formulas-in-data-table-not-re-evaluating/m-p/246218#M48367</link>
      <description>&lt;P&gt;Howdy,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;So today I have an issue with formulas not updating in my data table.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have a large table with a bunch of measurements. There is a script that sets columns with formulas to evaluate specifications contained in data table variables. These formulas are generated in the following way :&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;Eval( Eval Expr(Column(Concat(columnName," Spec"))&amp;lt;&amp;lt; Set Formula(

If( Column(expr(columnName))[]&amp;gt;Expr(USL),							
 Column(expr(Concat(expr(columnName)," Spec")))[]="High",
											
If( Column(expr(columnName))[]&amp;lt;Expr(LSL),
Column(expr(Concat(expr(columnName)," Spec")))[]="Low",	&lt;BR /&gt;Column(expr(Concat(expr(columnName)," Spec")))[]="OK";			
	)
    )
)));	&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;These formulas work fine but they only evaluate when they are set. When I try to change a value in a column, the specification is not evaluated. I checked in the column properties and the formula evaluations are enabled. The formulas do re-evaluate I check then uncheck the "suppress formula evaluation".&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I tried to modify this script by replacing "Columns" with "As Columns" and removing the []. This did not solve the&amp;nbsp; issue and made the implementation of these formulas 50% slower.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I tried to manually set formulas with the same template but using the actual column names (:Column instead of Column (expr (ColumnName ) &amp;nbsp;and they do work correctly. e.g, whenever&amp;nbsp;I change a value in one of the columns, the formula is evaluated straight away.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;So, is there a way to force re-evaluation upon modifying cells? ** NOT clicking the red button and re-evaluating all the formulas of the data table **&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Or perhaps another work around would be to have a script that writes the actual column names (e.g. :Column ) instead of having the Eval(expr(column (columname))).&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;So it looks like this:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Capture22.PNG" style="width: 446px;"&gt;&lt;img src="https://community.jmp.com/t5/image/serverpage/image-id/21610i498ED38042970BB6/image-size/large?v=v2&amp;amp;px=999" role="button" title="Capture22.PNG" alt="Capture22.PNG" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;instead of looking like this:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Capture.PNG" style="width: 661px;"&gt;&lt;img src="https://community.jmp.com/t5/image/serverpage/image-id/21609iB893E2A34E056686/image-size/large?v=v2&amp;amp;px=999" role="button" title="Capture.PNG" alt="Capture.PNG" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;DIV class="mceNonEditable lia-copypaste-placeholder"&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV class="mceNonEditable lia-copypaste-placeholder"&gt;&amp;nbsp;&lt;/DIV&gt;&lt;P&gt;Any ideas ?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sat, 10 Jun 2023 23:13:59 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Formulas-in-data-table-not-re-evaluating/m-p/246218#M48367</guid>
      <dc:creator>bobmorrane</dc:creator>
      <dc:date>2023-06-10T23:13:59Z</dc:date>
    </item>
    <item>
      <title>Re: Formulas in data table not re-evaluating</title>
      <link>https://community.jmp.com/t5/Discussions/Formulas-in-data-table-not-re-evaluating/m-p/246225#M48369</link>
      <description>&lt;P&gt;I cannot test it but I think that this approach might work:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;Eval(
	Substitute(
		Expr(
			nnn &amp;lt;&amp;lt; Set Formula(
				If(
					ccc &amp;gt; uuu,
						"High", 
					ccc &amp;lt; lll,
						"Low",
					"OK"
				)
			)
		),
		Expr( nnn ), Column( Concat( columnName, " Spec" ) ),
		Expr( ccc ), Column( columnName ),
		Expr( lll ), LSL,
		Expr( uuu ), USL
		)
	)
);&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Thu, 06 Feb 2020 13:37:32 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Formulas-in-data-table-not-re-evaluating/m-p/246225#M48369</guid>
      <dc:creator>Mark_Bailey</dc:creator>
      <dc:date>2020-02-06T13:37:32Z</dc:date>
    </item>
  </channel>
</rss>

