cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Choose Language Hide Translation Bar
swiergi11
Level III

Can some one help me with this, not sure what is wrong?

Hi,

I'm trying to control chart with expression ( and column name) selected in the combo box and reference in the control chart but getting the error below which i don't understand. I'm using the same expression early in the script and works flowless.

Thanks

swiergi11_1-1637069354565.png

 

4 REPLIES 4
SDF1
Super User

Re: Can some one help me with this, not sure what is wrong?

Hi @swiergi11 ,

 

  Not having your full code to debug, but glancing over the error that you have and the screenshot you saved, I think the problem is where you call the column name:

 

:Name("RSM_"||layer||"")

 

  Presumably, layer is a character in which case it already has the quotes around it, so you'd rather write: :Name("RSM_"||layer). If layer is a list layer = {"A", "B", "C"}, then you'd need to refer to the elements in it, like layer[1], etc. I don't think you need to add the ||"" after layer because this doesn't actually add anything to the column name. It looks like line 360 also has this problem?

 

  Also, you might want to know that the reference :Name() is being deprecated and will no longer be used after ver 16, I believe. Instead, they're using the reference :"column name goes here"n.

 

Hope this helps!,

DS

swiergi11
Level III

Re: Can some one help me with this, not sure what is wrong?

Hi,

 

Thanks for you response.

 

"layer" is the reference assigned to different data extract and then column naming in Combo Box depending which one is selected:

rr_cb = Combo Box( {"D0585DI", "D0585IG","D0585L3","D0585L2", "D0585L1"}, <<Set Width( 5 ) ),

 

layer = rr_cb << GetText;

 

I do change the source data column name to RSM_"layer " which will be one of the 5 above.

 

:VAR1VALUE << Set Name("RSM_"||layer||"");

 

When creating Control chart I'm trying to use the same analogy to chose column for the plot but this isn't working.

I have try your suggestions and the error is gone but CC is not getting created which i think is still due to naming error of that column.

 

Thanks,

Tomasz

 

 

 

SDF1
Super User

Re: Can some one help me with this, not sure what is wrong?

Hi @swiergi11 ,

 

  Can you share your script and data table? You can anonymize the data table so I don't know what's what.

 

  Having direct access to your script and data table will help to diagnose the core issue.

 

Thanks!,

DS

swiergi11
Level III

Re: Can some one help me with this, not sure what is wrong?

Hi DS,

 

Apologies for late replay, got quite busy lately.

So here is simplify version of my script, just would like the combo box chosen argument to be included in the column name which will then help to choose correct Control limits table etc.

At this point the script is not unable to understand the argument.

 

Names Default To Here( 1 );
New Window( "Data selection",
      <<Modal,
      Panel Box( "Select a Date Range",
             Lineup Box( N Col( 1 ),

                    text box("Chart ID"),

                   rr_cb = Combo Box( {"D0585DI", "D0585IG","D0585L3","D0585L2", "D0585L1"}, <<Set Width( 5 ) ))),

      H List Box(
             Button Box( "OK",
                   <<Set Function(
                         Function( {self},
                            
                                 layer = rr_cb << GetText;
                               
                         )
                   )
             ),
             Button Box( "Cancel" )
      )
);
dt = Open( "$SAMPLE_DATA/Big Class.jmp" );
//changing the "weight"" column name to RSM_"whichever chosen argument from combo box"
:weight << Set Name("RSM_"||layer);
//Creat control chart using RSM_"whichever choosen argument from combo box"
dt << 
Control Chart(
	Sample Label( :name),	
		Chart Col(
			:"RSM_"||layer,
			Levey Jennings(
			Show Zones( 1 ),Shade Zones( 1 ),
			Test 1( 1 ),
			Test 2( 1 ),
			Test 5( 1 ),
			Test 6( 1 ),
			Test Beyond Limits( 1 )			
		),
			Capability(
			Distribution(
				Continuous Distribution(
					 Column(:"RSM_"||layer),
					Quantiles( 0 ),
					Horizontal Layout( 1 ),
					Vertical( 0 ),
					Outlier Box Plot( 0 ),
					Normal Quantile Plot( 1 ),
					//Fit Distribution( "All" ),
					Process Capability(
						Use Column Property Specs,
						Process Capability Analysis(
							Process Summary( 1 ),
							Nonconformance( 0 ),
							Within Sigma Capability( 1 ),
							Histogram( 1, Show Within Sigma Density( 1 ) )
						)
					),
					Customize Summary Statistics( Skewness( 1 ) ),
					
			)
		)
	)
		));