<?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: How do I input a variable into &amp;quot;Historical Data End at Row&amp;quot; option for Multivariate Control Chart in JSL? in Discussions</title>
    <link>https://community.jmp.com/t5/Discussions/How-do-I-input-a-variable-into-quot-Historical-Data-End-at-Row/m-p/445180#M69312</link>
    <description>&lt;P&gt;The "Historical Data End at Row()" appears to not be able to evaluate a variable. Therefore, one needs to handle that in JSL.&amp;nbsp; A common way to do that is to use "Eval Insert()".&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;Names Default To Here( 1 );
dt = Open( "$SAMPLE_DATA/Quality Control/Flight Delays.jmp" );
row_end = 16;
Eval(
	Parse(
		Eval Insert(
			"obj = dt &amp;lt;&amp;lt; Model Driven Multivariate Control Chart( Process( :AA, :CO, :DL, :F9, :FL, :NW, :UA, :US, :WN ), Historical Data End at Row( ^row_end^ ))"
		)
	)
);&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;Or, one could use a Substitute() function to handle the issue&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;Names Default To Here( 1 );
dt = Open( "$SAMPLE_DATA/Quality Control/Flight Delays.jmp" );
row_end = 16;
Eval(
	Substitute(
			Expr(
				obj = dt &amp;lt;&amp;lt; Model Driven Multivariate Control Chart(
					Process( :AA, :CO, :DL, :F9, :FL, :NW, :UA, :US, :WN ),
					Historical Data End at Row( theEnd )
				)
			),
		Expr( theEnd ), row_end
	)
);&lt;/CODE&gt;&lt;/PRE&gt;</description>
    <pubDate>Wed, 15 Dec 2021 03:26:16 GMT</pubDate>
    <dc:creator>txnelson</dc:creator>
    <dc:date>2021-12-15T03:26:16Z</dc:date>
    <item>
      <title>How do I input a variable into "Historical Data End at Row" option for Multivariate Control Chart in JSL?</title>
      <link>https://community.jmp.com/t5/Discussions/How-do-I-input-a-variable-into-quot-Historical-Data-End-at-Row/m-p/445161#M69311</link>
      <description>&lt;P&gt;Hello.&lt;/P&gt;
&lt;P&gt;This is taken from one of the Scripting Index script.&lt;/P&gt;
&lt;P&gt;I was trying to write a JSL that essentially will have row_end as a dynamic input, but my current code below wouldn't work as intended.&lt;/P&gt;
&lt;P&gt;How do I write it so that it can work? I've tried putting the whole expression into Eval (Eval Parse(Expression)) but that also did not work.&lt;/P&gt;
&lt;P&gt;If I replace row_end with it's actual value, only then will my code work. Any ideas? Thanks.&lt;/P&gt;
&lt;P&gt;I'm using JMP16.&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/Quality Control/Flight Delays.jmp" );
row_end = 16;
obj = dt &amp;lt;&amp;lt; Model Driven Multivariate Control Chart( Process( :AA, :CO, :DL, :F9, :FL, :NW, :UA, :US, :WN ), Historical Data End at Row( row_end ) );&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Fri, 09 Jun 2023 18:07:28 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/How-do-I-input-a-variable-into-quot-Historical-Data-End-at-Row/m-p/445161#M69311</guid>
      <dc:creator>Zahzul</dc:creator>
      <dc:date>2023-06-09T18:07:28Z</dc:date>
    </item>
    <item>
      <title>Re: How do I input a variable into "Historical Data End at Row" option for Multivariate Control Chart in JSL?</title>
      <link>https://community.jmp.com/t5/Discussions/How-do-I-input-a-variable-into-quot-Historical-Data-End-at-Row/m-p/445180#M69312</link>
      <description>&lt;P&gt;The "Historical Data End at Row()" appears to not be able to evaluate a variable. Therefore, one needs to handle that in JSL.&amp;nbsp; A common way to do that is to use "Eval Insert()".&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;Names Default To Here( 1 );
dt = Open( "$SAMPLE_DATA/Quality Control/Flight Delays.jmp" );
row_end = 16;
Eval(
	Parse(
		Eval Insert(
			"obj = dt &amp;lt;&amp;lt; Model Driven Multivariate Control Chart( Process( :AA, :CO, :DL, :F9, :FL, :NW, :UA, :US, :WN ), Historical Data End at Row( ^row_end^ ))"
		)
	)
);&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;Or, one could use a Substitute() function to handle the issue&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;Names Default To Here( 1 );
dt = Open( "$SAMPLE_DATA/Quality Control/Flight Delays.jmp" );
row_end = 16;
Eval(
	Substitute(
			Expr(
				obj = dt &amp;lt;&amp;lt; Model Driven Multivariate Control Chart(
					Process( :AA, :CO, :DL, :F9, :FL, :NW, :UA, :US, :WN ),
					Historical Data End at Row( theEnd )
				)
			),
		Expr( theEnd ), row_end
	)
);&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Wed, 15 Dec 2021 03:26:16 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/How-do-I-input-a-variable-into-quot-Historical-Data-End-at-Row/m-p/445180#M69312</guid>
      <dc:creator>txnelson</dc:creator>
      <dc:date>2021-12-15T03:26:16Z</dc:date>
    </item>
  </channel>
</rss>

