<?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: Using numeric objects in a column equation in Discussions</title>
    <link>https://community.jmp.com/t5/Discussions/Using-numeric-objects-in-a-column-equation/m-p/903587#M106258</link>
    <description>&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;For( i = 1, i &amp;lt;= 8, i++,
	col = 11 + i;
	colname = Column(col) &amp;lt;&amp;lt; get name;
	l = col - i;
	m = col + 1 - i;
	colno = Char( col );
	Eval(Eval Expr(New Column( "Column " || colno,
		Character,
		"Nominal",
		Formula(
			If( Row() == 12,
				Lag( Column( 1 ), Expr(l) ),
				If( Row() == 13,
					Lag( Column( 2 ), Expr(m) ),
					Lag( Expr(Name Expr(As Column( colname))), 1 )
				)
			)
		)))
	);
);
&lt;/CODE&gt;&lt;/PRE&gt;</description>
    <pubDate>Thu, 25 Sep 2025 08:17:06 GMT</pubDate>
    <dc:creator>hogi</dc:creator>
    <dc:date>2025-09-25T08:17:06Z</dc:date>
    <item>
      <title>Using numeric objects in a column equation</title>
      <link>https://community.jmp.com/t5/Discussions/Using-numeric-objects-in-a-column-equation/m-p/903484#M106245</link>
      <description>&lt;P&gt;I need to be able to take a numeric object that increases or decreases in an iterative function and use it in a column formula.&amp;nbsp; In the equation below, the values of col, l and m need to be evaluated in the column formula.&amp;nbsp; How can I get this to happen?&amp;nbsp; Parse(), Eval() and Num() aren't working.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;	For( i = 1, i &amp;lt;=8, i++,
	col = 11+i;
	l = col - i;
	m = col + 1 - i; 
	colno = Char(col);
	 New Column("Column "||colno, Character, "Nominal", Formula(If(Row() == 12, Lag(Column(1), l), If(Row() == 13, Lag(Column(2), m), Lag(Column(col, 1)))))));&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Wed, 24 Sep 2025 21:42:40 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Using-numeric-objects-in-a-column-equation/m-p/903484#M106245</guid>
      <dc:creator>SpannerHead</dc:creator>
      <dc:date>2025-09-24T21:42:40Z</dc:date>
    </item>
    <item>
      <title>Re: Using numeric objects in a column equation</title>
      <link>https://community.jmp.com/t5/Discussions/Using-numeric-objects-in-a-column-equation/m-p/903499#M106247</link>
      <description>&lt;P&gt;This seems to work.&amp;nbsp; Eval( Eval Expr(....) ) evaluates the expressions before creating the column.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;For( i = 1, i &amp;lt;= 8, i++,
	col = 11 + i;
	l = col - i;
	m = col + 1 - i;
	colno = Char( col );
	Eval(
		Eval Expr(
			New Column( "Column " || Expr( colno ),
				Character,
				"Nominal",
				Formula(
					If( Row() == 12,
						Lag( Column( 1 ), Expr( l ) ),
						If( Row() == 13,
							Lag( Column( 2 ), Expr( m ) ),
							Lag( Column( Expr( col ), 1 ) )
						)
					)
				)
			)
		)
	);
);&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Wed, 24 Sep 2025 21:58:27 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Using-numeric-objects-in-a-column-equation/m-p/903499#M106247</guid>
      <dc:creator>mmarchandFSLR</dc:creator>
      <dc:date>2025-09-24T21:58:27Z</dc:date>
    </item>
    <item>
      <title>Re: Using numeric objects in a column equation</title>
      <link>https://community.jmp.com/t5/Discussions/Using-numeric-objects-in-a-column-equation/m-p/903585#M106256</link>
      <description>&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;Column( col, 1 )&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;?&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="hogi_0-1758800939329.png" style="width: 400px;"&gt;&lt;img src="https://community.jmp.com/t5/image/serverpage/image-id/83481i7E4D54BD82B264F2/image-size/medium?v=v2&amp;amp;px=400" role="button" title="hogi_0-1758800939329.png" alt="hogi_0-1758800939329.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 25 Sep 2025 11:49:06 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Using-numeric-objects-in-a-column-equation/m-p/903585#M106256</guid>
      <dc:creator>hogi</dc:creator>
      <dc:date>2025-09-25T11:49:06Z</dc:date>
    </item>
    <item>
      <title>Re: Using numeric objects in a column equation</title>
      <link>https://community.jmp.com/t5/Discussions/Using-numeric-objects-in-a-column-equation/m-p/903586#M106257</link>
      <description>&lt;P&gt;No variable defined &lt;STRONG&gt;outside&lt;/STRONG&gt; of the new column message should be used &lt;STRONG&gt;inside&lt;/STRONG&gt; the &lt;FONT face="courier new,courier"&gt;new column()&lt;/FONT&gt; message.&lt;BR /&gt;In my company we have an automatic check that detects such programming issues before executing the code.&lt;BR /&gt;If a potential error is detected, a warning message is presented to the user with some suggestions.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;LI-MESSAGE title="Re: Expression Handling in JMP: Tipps and Trapdoors" uid="826252" url="https://community.jmp.com/t5/Discussions/Expression-Handling-in-JMP-Tips-and-Trapdoors/m-p/826252#U826252" discussion_style_icon_css="lia-mention-container-editor-message lia-img-icon-forum-thread lia-fa-icon lia-fa-forum lia-fa-thread lia-fa"&gt;&lt;/LI-MESSAGE&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;For( i = 1, i &amp;lt;= 8, i++,
	col = 11 + i;&lt;BR /&gt;
	l = col - i;
	m = col + 1 - i;
	colno = Char( col );
	Eval(Eval Expr(New Column( "Column " || colno,
		Character,
		"Nominal",
		Formula(
			If( Row() == 12,
				Lag( Column( 1 ), Expr(l) ),
				If( Row() == 13,
					Lag( Column( 2 ), Expr(m) ),
					Lag( Expr(Name Expr(As Column( col))), 1 )
				)
			)
		)))
	);
);&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;ouch! As column doesn't understand numbers ...&lt;/P&gt;</description>
      <pubDate>Thu, 25 Sep 2025 11:50:50 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Using-numeric-objects-in-a-column-equation/m-p/903586#M106257</guid>
      <dc:creator>hogi</dc:creator>
      <dc:date>2025-09-25T11:50:50Z</dc:date>
    </item>
    <item>
      <title>Re: Using numeric objects in a column equation</title>
      <link>https://community.jmp.com/t5/Discussions/Using-numeric-objects-in-a-column-equation/m-p/903587#M106258</link>
      <description>&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;For( i = 1, i &amp;lt;= 8, i++,
	col = 11 + i;
	colname = Column(col) &amp;lt;&amp;lt; get name;
	l = col - i;
	m = col + 1 - i;
	colno = Char( col );
	Eval(Eval Expr(New Column( "Column " || colno,
		Character,
		"Nominal",
		Formula(
			If( Row() == 12,
				Lag( Column( 1 ), Expr(l) ),
				If( Row() == 13,
					Lag( Column( 2 ), Expr(m) ),
					Lag( Expr(Name Expr(As Column( colname))), 1 )
				)
			)
		)))
	);
);
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Thu, 25 Sep 2025 08:17:06 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Using-numeric-objects-in-a-column-equation/m-p/903587#M106258</guid>
      <dc:creator>hogi</dc:creator>
      <dc:date>2025-09-25T08:17:06Z</dc:date>
    </item>
    <item>
      <title>Re: Using numeric objects in a column equation</title>
      <link>https://community.jmp.com/t5/Discussions/Using-numeric-objects-in-a-column-equation/m-p/903649#M106263</link>
      <description>&lt;P&gt;Good catch.&lt;/P&gt;</description>
      <pubDate>Thu, 25 Sep 2025 11:30:09 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Using-numeric-objects-in-a-column-equation/m-p/903649#M106263</guid>
      <dc:creator>mmarchandFSLR</dc:creator>
      <dc:date>2025-09-25T11:30:09Z</dc:date>
    </item>
    <item>
      <title>Re: Using numeric objects in a column equation</title>
      <link>https://community.jmp.com/t5/Discussions/Using-numeric-objects-in-a-column-equation/m-p/903920#M106269</link>
      <description>&lt;P&gt;&lt;a href="https://community.jmp.com/t5/user/viewprofilepage/user-id/26800"&gt;@hogi&lt;/a&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I get a modification of the script from &lt;A class="trigger-hovercard" href="https://community.jmp.com/t5/user/viewprofilepage/user-id/58003" target="_blank"&gt;mmarchandFSLR&lt;/A&gt;&amp;nbsp;(shown below) to work just fine, great addition.&amp;nbsp; Not sure I understand the concern, please clarify?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;dt = Current Data Table();

Delete Symbols();

dt = Current Data Table();

For( i = 1, i &amp;lt;= 8, i++,
	c = 11 + i;
	l = 12 - i;
	m = 13 - i;
	colno = Char( c );
	Eval(Eval Expr(New Column( "Column " || colno,
		Character,
		"Nominal",
		Formula(
			If( Row() == 12,
				Lag( As Column( 1 ), Expr(l) ),
				If( Row() == 13,
					Lag( As Column( 2 ), Expr(m) ),
					Lag( As Column( Expr(c)) , 1)
				)
			)
		)))
	);
);&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Thu, 25 Sep 2025 14:34:57 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Using-numeric-objects-in-a-column-equation/m-p/903920#M106269</guid>
      <dc:creator>SpannerHead</dc:creator>
      <dc:date>2025-09-25T14:34:57Z</dc:date>
    </item>
    <item>
      <title>Re: Using numeric objects in a column equation</title>
      <link>https://community.jmp.com/t5/Discussions/Using-numeric-objects-in-a-column-equation/m-p/903939#M106270</link>
      <description>&lt;P&gt;First it blew my mind that even after correcting the detail around&amp;nbsp;&lt;/P&gt;
&lt;PRE class="language-jsl"&gt;&lt;CODE&gt;Column( col, 1 )&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;a href="https://community.jmp.com/t5/user/viewprofilepage/user-id/58003"&gt;@mmarchandFSLR&lt;/a&gt;&amp;nbsp;'s solution doesn't seem to work.&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;Lag()&lt;/FONT&gt; expects &lt;FONT face="courier new,courier"&gt;As Column()&lt;/FONT&gt;, not a &lt;FONT face="courier new,courier"&gt;column()&lt;/FONT&gt; ?!??!&lt;BR /&gt;This destroys all my "knowledge" of &lt;FONT face="courier new,courier"&gt;As Column()&lt;/FONT&gt; being used for accessing the &lt;U&gt;&lt;STRONG&gt;value&lt;/STRONG&gt; of the current row&lt;/U&gt;!&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Concerning &lt;FONT face="courier new,courier"&gt;As Column (col)&lt;/FONT&gt; instead of&amp;nbsp; &lt;FONT face="courier new,courier"&gt;Name Expr(As column(col)):&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;It works -&amp;nbsp;but it's "fragile" against:&lt;/P&gt;
&lt;P&gt;- adding&amp;nbsp; a column (the number doesn't get updated!)&lt;/P&gt;
&lt;P&gt;- changed entries (on my system, the entries of the formula column don't get updated?!?)&lt;BR /&gt;&amp;nbsp; [I will delete this one if the situation gets better after a restart]&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 25 Sep 2025 20:16:54 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Using-numeric-objects-in-a-column-equation/m-p/903939#M106270</guid>
      <dc:creator>hogi</dc:creator>
      <dc:date>2025-09-25T20:16:54Z</dc:date>
    </item>
    <item>
      <title>Re: Using numeric objects in a column equation</title>
      <link>https://community.jmp.com/t5/Discussions/Using-numeric-objects-in-a-column-equation/m-p/903966#M106273</link>
      <description>&lt;P&gt;Seems worth to be documented:&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" );
New Column( "height 2",	Formula( :height ));
New Column( "height 3",	Formula( As Column( "height" ) ));
New Column( "height 4",	Formula( As Column( 4 ) ));
New Column( "height 5",	Formula( Column( 4 )[Empty()] ));
wait(0);

dt[5::10, "height"] = 1;
wait(0);
New window(&amp;lt;&amp;lt; type("modal dialog"), Text Box ("just height 1 got updated ... continue"));


dt &amp;lt;&amp;lt; Move Selected Columns( {:height}, after( :name ) );

New window(&amp;lt;&amp;lt; type("modal dialog"), Text Box ("no big difference - now let's recalc"));


dt &amp;lt;&amp;lt; rerun formulas();&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;before&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;after&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="hogi_0-1758817287097.png" style="width: 314px;"&gt;&lt;img src="https://community.jmp.com/t5/image/serverpage/image-id/83515i9C906E9DADD332BF/image-dimensions/314x264?v=v2" width="314" height="264" role="button" title="hogi_0-1758817287097.png" alt="hogi_0-1758817287097.png" /&gt;&lt;/span&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="hogi_1-1758817309939.png" style="width: 314px;"&gt;&lt;img src="https://community.jmp.com/t5/image/serverpage/image-id/83516i24BEF1E8DD3D1354/image-dimensions/314x263?v=v2" width="314" height="263" role="button" title="hogi_1-1758817309939.png" alt="hogi_1-1758817309939.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;OL&gt;
&lt;LI&gt;The interpreter of the column formula understands Column(4) and As Column (4), Column("height") and so on ....&lt;BR /&gt;But the mechanism that updates columns if input columns change - doesn't? One has to trigger the update manually?&lt;/LI&gt;
&lt;LI&gt;When the column is moved to another place, the number don't get updated.&lt;/LI&gt;
&lt;/OL&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I will never use numbers in column reference!&lt;BR /&gt;I will never use something like &lt;FONT face="courier new,courier"&gt;Column ("height")&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Fun fact:&lt;BR /&gt;Formula Editor doesn't like it either:&lt;FONT face="courier new,courier"&gt;&lt;BR /&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="hogi_2-1758817660057.png" style="width: 400px;"&gt;&lt;img src="https://community.jmp.com/t5/image/serverpage/image-id/83517iE72EC6673AB31384/image-size/medium?v=v2&amp;amp;px=400" role="button" title="hogi_2-1758817660057.png" alt="hogi_2-1758817660057.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="courier new,courier"&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/FONT&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 25 Sep 2025 16:28:06 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Using-numeric-objects-in-a-column-equation/m-p/903966#M106273</guid>
      <dc:creator>hogi</dc:creator>
      <dc:date>2025-09-25T16:28:06Z</dc:date>
    </item>
    <item>
      <title>Re: Using numeric objects in a column equation</title>
      <link>https://community.jmp.com/t5/Discussions/Using-numeric-objects-in-a-column-equation/m-p/904038#M106283</link>
      <description>&lt;P&gt;I guess I should have described my dark purpose.&amp;nbsp; I have a table that can't decide between being a tall table and a wide table.&amp;nbsp; Columns 1 &amp;amp; 2 rows 1-8 are tall, columns 1-11 become a wide table after row 12.&amp;nbsp; This script is step 1 in knocking some sense into the table.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;before&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;after&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="SpannerHead_0-1758830958019.png" style="width: 400px;"&gt;&lt;img src="https://community.jmp.com/t5/image/serverpage/image-id/83531i22EC7AB89D41877D/image-size/medium?v=v2&amp;amp;px=400" role="button" title="SpannerHead_0-1758830958019.png" alt="SpannerHead_0-1758830958019.png" /&gt;&lt;/span&gt;&amp;nbsp;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="SpannerHead_1-1758831060305.png" style="width: 400px;"&gt;&lt;img src="https://community.jmp.com/t5/image/serverpage/image-id/83532iFACD44A126FEFE7F/image-size/medium?v=v2&amp;amp;px=400" role="button" title="SpannerHead_1-1758831060305.png" alt="SpannerHead_1-1758831060305.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&lt;BR /&gt;I do a series of further steps to process the data but this was the tricky part.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 25 Sep 2025 20:12:45 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Using-numeric-objects-in-a-column-equation/m-p/904038#M106283</guid>
      <dc:creator>SpannerHead</dc:creator>
      <dc:date>2025-09-25T20:12:45Z</dc:date>
    </item>
  </channel>
</rss>

