<?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 How to avoid error when using the row change handler? in Discussions</title>
    <link>https://community.jmp.com/t5/Discussions/How-to-avoid-error-when-using-the-row-change-handler/m-p/763076#M94397</link>
    <description>&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;go_down_expr = Expr(
	
	cur_row = (dt &amp;lt;&amp;lt; get selected rows());
	If(
		N Items( cur_row ) == 0,
			New Window( "Alert", &amp;lt;&amp;lt;size( 300, 100 ), Border Box( top( 10 ), bottom( 10 ), Left( 10 ), Right( 10 ), Text Box( "No selection" ) ) ),
		N Items( Loc( crows &amp;gt; cur_row[1] ) ) == 0, dt &amp;lt;&amp;lt; gotorow( crows[1] ),
		dt &amp;lt;&amp;lt; go to row( crows[(Loc( crows &amp;gt; cur_row[1] ))[1]] )
	);
	
);

f = Function( {a = [1]}, 
	val_lst = dt[a, x5_col];
	dt2 &amp;lt;&amp;lt; clear select();
	For Each( {value, index}, val_lst, If( Column( dt2, 1 )[index] != value, Column( dt2, 1 )[index] = value ) );
	Column( dt2, 1 ) &amp;lt;&amp;lt; Delete Property( "Spec Limits" );
	cpk_show = Column( dt, "CPKvalue" )[a];
	cpko_show = Column( dt, "Cpk" )[a];
	ncb1 &amp;lt;&amp;lt; set( cpko_show[1] );
	ncb2 &amp;lt;&amp;lt; set( Round( cpk_show[1], 3 ) );
	Eval(
		Eval Expr(
			Column( dt2, 1 ) &amp;lt;&amp;lt; Set Property(
				"Spec Limits",
				{LSL( Expr( LSL[a[1]] ) ), USL( Expr( USL[a[1]] ) ), Target( Expr( dt:Nominal[a[1]] ) ), Show Limits( 1 )}
			)
		)
	);
	For Each( {value, index}, dt[a, x5_col], Eval( Parse( "d" || Char( index ) || "&amp;lt;&amp;lt;set(" || Char( value ) || ")" ) ) );
	a = a[1];
	
	backup = dt2 &amp;lt;&amp;lt; Distribution( invisible, Column( :y ), Fit Normal( Goodness of Fit( 1 ) ), Histograms Only ); 
	
	
	pvalue = Report( backup )["Goodness-of-Fit Test"][Number Col Box( "Prob&amp;lt;W" )][1];
	backup &amp;lt;&amp;lt; close window;
	

	xmax = Report( obj2 )[axisbox( 1 )] &amp;lt;&amp;lt; get max;
	xmin = Report( obj2 )[axisbox( 1 )] &amp;lt;&amp;lt; get min;
	ymax = Report( obj2 )[axisbox( 2 )] &amp;lt;&amp;lt; get max;
	ymin = Report( obj2 )[axisbox( 2 )] &amp;lt;&amp;lt; get min;
	
	Report( obj2 )[axisbox( 2 )] &amp;lt;&amp;lt; max(28);
	
	Report( obj2 )[framebox( 1 )] &amp;lt;&amp;lt; append seg( ts1 = Text Seg( "" ) );
	ts1 &amp;lt;&amp;lt; set location( xmax - (xmax - xmin) / 6, 25 );
	
	If( pvalue &amp;gt;= 0.05,
		ts1 &amp;lt;&amp;lt; set text( "normal" );
		ts1 &amp;lt;&amp;lt; Set Text Color( "dark Green" );
	,
		ts1 &amp;lt;&amp;lt; set text( "non-normal" );
		ts1 &amp;lt;&amp;lt; Set Text Color( "Red" );
	);

);

rs = dt &amp;lt;&amp;lt; make row state handler( f );&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;Hi guys, I've got a problem: I've created a row handler function that automatically calculates normality when rows change, draws graphs, etc.; it uses a button box to control the action of moving to the next row, but when I click too fast, an error occurs indicating that&amp;nbsp; the loop was detected earlier.&amp;nbsp;&lt;/P&gt;&lt;P&gt;How to solve it?&lt;/P&gt;&lt;P&gt;Thanks!&lt;/P&gt;</description>
    <pubDate>Tue, 11 Jun 2024 08:35:12 GMT</pubDate>
    <dc:creator>lehaofeng</dc:creator>
    <dc:date>2024-06-11T08:35:12Z</dc:date>
    <item>
      <title>How to avoid error when using the row change handler?</title>
      <link>https://community.jmp.com/t5/Discussions/How-to-avoid-error-when-using-the-row-change-handler/m-p/763076#M94397</link>
      <description>&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;go_down_expr = Expr(
	
	cur_row = (dt &amp;lt;&amp;lt; get selected rows());
	If(
		N Items( cur_row ) == 0,
			New Window( "Alert", &amp;lt;&amp;lt;size( 300, 100 ), Border Box( top( 10 ), bottom( 10 ), Left( 10 ), Right( 10 ), Text Box( "No selection" ) ) ),
		N Items( Loc( crows &amp;gt; cur_row[1] ) ) == 0, dt &amp;lt;&amp;lt; gotorow( crows[1] ),
		dt &amp;lt;&amp;lt; go to row( crows[(Loc( crows &amp;gt; cur_row[1] ))[1]] )
	);
	
);

f = Function( {a = [1]}, 
	val_lst = dt[a, x5_col];
	dt2 &amp;lt;&amp;lt; clear select();
	For Each( {value, index}, val_lst, If( Column( dt2, 1 )[index] != value, Column( dt2, 1 )[index] = value ) );
	Column( dt2, 1 ) &amp;lt;&amp;lt; Delete Property( "Spec Limits" );
	cpk_show = Column( dt, "CPKvalue" )[a];
	cpko_show = Column( dt, "Cpk" )[a];
	ncb1 &amp;lt;&amp;lt; set( cpko_show[1] );
	ncb2 &amp;lt;&amp;lt; set( Round( cpk_show[1], 3 ) );
	Eval(
		Eval Expr(
			Column( dt2, 1 ) &amp;lt;&amp;lt; Set Property(
				"Spec Limits",
				{LSL( Expr( LSL[a[1]] ) ), USL( Expr( USL[a[1]] ) ), Target( Expr( dt:Nominal[a[1]] ) ), Show Limits( 1 )}
			)
		)
	);
	For Each( {value, index}, dt[a, x5_col], Eval( Parse( "d" || Char( index ) || "&amp;lt;&amp;lt;set(" || Char( value ) || ")" ) ) );
	a = a[1];
	
	backup = dt2 &amp;lt;&amp;lt; Distribution( invisible, Column( :y ), Fit Normal( Goodness of Fit( 1 ) ), Histograms Only ); 
	
	
	pvalue = Report( backup )["Goodness-of-Fit Test"][Number Col Box( "Prob&amp;lt;W" )][1];
	backup &amp;lt;&amp;lt; close window;
	

	xmax = Report( obj2 )[axisbox( 1 )] &amp;lt;&amp;lt; get max;
	xmin = Report( obj2 )[axisbox( 1 )] &amp;lt;&amp;lt; get min;
	ymax = Report( obj2 )[axisbox( 2 )] &amp;lt;&amp;lt; get max;
	ymin = Report( obj2 )[axisbox( 2 )] &amp;lt;&amp;lt; get min;
	
	Report( obj2 )[axisbox( 2 )] &amp;lt;&amp;lt; max(28);
	
	Report( obj2 )[framebox( 1 )] &amp;lt;&amp;lt; append seg( ts1 = Text Seg( "" ) );
	ts1 &amp;lt;&amp;lt; set location( xmax - (xmax - xmin) / 6, 25 );
	
	If( pvalue &amp;gt;= 0.05,
		ts1 &amp;lt;&amp;lt; set text( "normal" );
		ts1 &amp;lt;&amp;lt; Set Text Color( "dark Green" );
	,
		ts1 &amp;lt;&amp;lt; set text( "non-normal" );
		ts1 &amp;lt;&amp;lt; Set Text Color( "Red" );
	);

);

rs = dt &amp;lt;&amp;lt; make row state handler( f );&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;Hi guys, I've got a problem: I've created a row handler function that automatically calculates normality when rows change, draws graphs, etc.; it uses a button box to control the action of moving to the next row, but when I click too fast, an error occurs indicating that&amp;nbsp; the loop was detected earlier.&amp;nbsp;&lt;/P&gt;&lt;P&gt;How to solve it?&lt;/P&gt;&lt;P&gt;Thanks!&lt;/P&gt;</description>
      <pubDate>Tue, 11 Jun 2024 08:35:12 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/How-to-avoid-error-when-using-the-row-change-handler/m-p/763076#M94397</guid>
      <dc:creator>lehaofeng</dc:creator>
      <dc:date>2024-06-11T08:35:12Z</dc:date>
    </item>
    <item>
      <title>Re: How to avoid error when using the row change handler?</title>
      <link>https://community.jmp.com/t5/Discussions/How-to-avoid-error-when-using-the-row-change-handler/m-p/763328#M94413</link>
      <description>&lt;P&gt;If you are using button to move to next row, do you need row state handler?&lt;/P&gt;</description>
      <pubDate>Tue, 11 Jun 2024 15:50:28 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/How-to-avoid-error-when-using-the-row-change-handler/m-p/763328#M94413</guid>
      <dc:creator>jthi</dc:creator>
      <dc:date>2024-06-11T15:50:28Z</dc:date>
    </item>
    <item>
      <title>Re: How to avoid error when using the row change handler?</title>
      <link>https://community.jmp.com/t5/Discussions/How-to-avoid-error-when-using-the-row-change-handler/m-p/764575#M94421</link>
      <description>&lt;P&gt;Thanks! You're right. I was overthinking it.&lt;/P&gt;</description>
      <pubDate>Wed, 12 Jun 2024 01:06:41 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/How-to-avoid-error-when-using-the-row-change-handler/m-p/764575#M94421</guid>
      <dc:creator>lehaofeng</dc:creator>
      <dc:date>2024-06-12T01:06:41Z</dc:date>
    </item>
  </channel>
</rss>

