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

How to close save limit tables and control chart window using JSL

I have  a summary table from which I have to generate control limits and store in control limit data-table. I'm using "Individual Measurement" control chart to get these limits which will be applied on main data.

Now I have tried saving limits to new table but in my case I have to get these limits by 7 different places for a certain process which is causing to generate 7 charts and 7 limit tables.

I've done joining the tables to get what is expected but no idea how to get rid of these unwanted charts and tables. I have tried this till now:

Summary Table:

Process--> ISB Wt/kg 2+3 Paste |||||||||   By---> Plasma Type(7 unique values)

9081_Capture.JPG

Code:

unique_val=Associative Array(

sorted_summary:"ISB Paste Source/Plasma Type"<<GetValues

)<<GetKeys;

For(i=1,i<=N Items(unique_val),i++,

Current Data Table(sorted_summary);

cc=Control Chart(

Sample Label(:ISB Date Manf.),

Group Size(1),

KSigma(3),

:Name("ISB Wt/Kg 2+3 Paste"),

Individual Measurement),

Where(:Name("ISB Paste Source/Plasma Type")==unique_val[i])

);

If(

i==1,IR_dt1=cc<<In New Table("invisible");IR_dt1<<New Column("Chart Type",Character,Nominal);:Chart Type<<Set Each Value("Individual");IR_dt1<<New Column("Parameter",Character,Nominal);

:Parameter<<Set Each Value("ISB Wt/Kg 2+3 Paste");Column("ISB Wt/Kg 2+3 Paste")<<Set Name(unique_val[i]),

i==2,IR_dt2=cc<<In New Table("invisible");;Column("ISB Wt/Kg 2+3 Paste")<<Set Name(unique_val[i]);IR_dt2=IR_dt2<<Join(With(IR_dt1),Merge Same Name Columns,Drop multiples(0,0),Preserve main table order(1));

Close(IR_dt1,No Save),

i==3,IR_dt3=cc<<In New Table("invisible");Column("ISB Wt/Kg 2+3 Paste")<<Set Name(unique_val[i]);IR_dt3=IR_dt3<<Join(With(IR_dt2),Merge Same Name Columns,Drop multiples(0,0),Preserve main table order(1));

Close(IR_dt2,No Save),

i==4,IR_dt4=cc<<In New Table("invisible");Column("ISB Wt/Kg 2+3 Paste")<<Set Name(unique_val[i]);IR_dt4=IR_dt4<<Join(With(IR_dt3),Merge Same Name Columns,Drop multiples(0,0),Preserve main table order(1));

Close(IR_dt3,No Save),

i==5,IR_dt5=cc<<In New Table("invisible");Column("ISB Wt/Kg 2+3 Paste")<<Set Name(unique_val[i]);IR_dt5=IR_dt5<<Join(With(IR_dt4),Merge Same Name Columns,Drop multiples(0,0),Preserve main table order(1));

Close(IR_dt4,No Save),

i==6,IR_dt6=cc<<In New Table("invisible");;Column("ISB Wt/Kg 2+3 Paste")<<Set Name(unique_val[i]);IR_dt6=IR_dt6<<Join(With(IR_dt5),Merge Same Name Columns,Drop multiples(0,0),Preserve main table order(1));

Close(IR_dt5,No Save),

i==7,IR_dt7=cc<<In New Table("invisible");Column("ISB Wt/Kg 2+3 Paste")<<Set Name(unique_val[i]);IR_dt7=IR_dt7<<Join(With(IR_dt6),Merge Same Name Columns,Drop multiples(0,0),Preserve main table order(1));

Close(IR_dt6,No Save);IR_dt7<<Move Selected Columns({"Chart Type"},To First);IR_dt7<<Move Selected Columns({"Parameter"},To First);

);

);

1 ACCEPTED SOLUTION

Accepted Solutions
vs90
Level III

Re: How to close save limit tables and control chart window using JSL

And I figured it out somehow......Don't know it's efficient or not but do the needful....

Re-Coded:

unique_val=Associative Array(

sorted_summary:"ISB Paste Source/Plasma Type"<<GetValues

)<<GetKeys;

disp=Function({key,value},

result_win=New Window("Control Charts For"|| key,

H List Box(

Panel Box("Individual & Moving Range",Current Data Table(sorted_summary);

cc=Control Chart(

Sample Label(:ISB Date Manf.),

Group Size(1),KSigma(3),

process_clmn,Individual Measurement),

Where(:Name("ISB Paste Source/Plasma Type")==key)

);

If(

value==1,IR_dt1=cc<<In New Table("invisible");IR_dt1<<New Column("Chart Type",Character,Nominal);:Chart Type<<Set Each Value("Individual");IR_dt1<<New Column("Parameter",Character,Nominal);

:Parameter<<Set Each Value(clmn_nm);Column(clmn_nm)<<Set Name(key),

value==2,IR_dt=cc<<In New Table("invisible");Column(clmn_nm)<<Set Name(key);IR_dt2=IR_dt<<Join(With(IR_dt1),Merge Same Name Columns,Drop multiples(0,0),Preserve main table order(1));

Close(IR_dt1,No Save);Close(IR_dt,No Save),

value==3,IR_dt=cc<<In New Table("invisible");Column(clmn_nm)<<Set Name(key);IR_dt3=IR_dt<<Join(With(IR_dt2),Merge Same Name Columns,Drop multiples(0,0),Preserve main table order(1));

Close(IR_dt2,No Save);Close(IR_dt,No Save),

value==4,IR_dt=cc<<In New Table("invisible");Column(clmn_nm)<<Set Name(key);IR_dt4=IR_dt<<Join(With(IR_dt3),Merge Same Name Columns,Drop multiples(0,0),Preserve main table order(1));

Close(IR_dt3,No Save);Close(IR_dt,No Save),

value==5,IR_dt=cc<<In New Table("invisible");Column(clmn_nm)<<Set Name(key);IR_dt5=IR_dt<<Join(With(IR_dt4),Merge Same Name Columns,Drop multiples(0,0),Preserve main table order(1));

Close(IR_dt4,No Save);Close(IR_dt,No Save),

value==6,IR_dt=cc<<In New Table("invisible");Column(clmn_nm)<<Set Name(key);IR_dt6=IR_dt<<Join(With(IR_dt5),Merge Same Name Columns,Drop multiples(0,0),Preserve main table order(1));

Close(IR_dt5,No Save);Close(IR_dt,No Save),

value==7,IR_dt=cc<<In New Table("invisible");Column(clmn_nm)<<Set Name(key);IR_dt7=IR_dt<<Join(With(IR_dt6),Merge Same Name Columns,Drop multiples(0,0),Preserve main table order(1));

IR_dt7<<Move Selected Columns({"Chart Type"},To First);IR_dt7<<Move Selected Columns({"Parameter"},To First);Close(IR_dt6,No Save);Close(IR_dt,No Save);

);

),

.........Continued same as above for other Control Charts and concatenated the 7th table of each chart to generate final limit table and closed all other.

)

result_win<<Close Window;

);<<<<<<<Function Ends Here

For(i=1,i<=N Items(unique_val),i++,

disp(unique_val[i],i);

);

** (Might miss some other variables so just to update regarding it)

clmn_nm is a variable which I'm getting from user input using  this

New Window( "Select Process/Parameter Column",<<Modal,Panel Box("Select Columns",clmn=Col List Box(all)));

View solution in original post

1 REPLY 1
vs90
Level III

Re: How to close save limit tables and control chart window using JSL

And I figured it out somehow......Don't know it's efficient or not but do the needful....

Re-Coded:

unique_val=Associative Array(

sorted_summary:"ISB Paste Source/Plasma Type"<<GetValues

)<<GetKeys;

disp=Function({key,value},

result_win=New Window("Control Charts For"|| key,

H List Box(

Panel Box("Individual & Moving Range",Current Data Table(sorted_summary);

cc=Control Chart(

Sample Label(:ISB Date Manf.),

Group Size(1),KSigma(3),

process_clmn,Individual Measurement),

Where(:Name("ISB Paste Source/Plasma Type")==key)

);

If(

value==1,IR_dt1=cc<<In New Table("invisible");IR_dt1<<New Column("Chart Type",Character,Nominal);:Chart Type<<Set Each Value("Individual");IR_dt1<<New Column("Parameter",Character,Nominal);

:Parameter<<Set Each Value(clmn_nm);Column(clmn_nm)<<Set Name(key),

value==2,IR_dt=cc<<In New Table("invisible");Column(clmn_nm)<<Set Name(key);IR_dt2=IR_dt<<Join(With(IR_dt1),Merge Same Name Columns,Drop multiples(0,0),Preserve main table order(1));

Close(IR_dt1,No Save);Close(IR_dt,No Save),

value==3,IR_dt=cc<<In New Table("invisible");Column(clmn_nm)<<Set Name(key);IR_dt3=IR_dt<<Join(With(IR_dt2),Merge Same Name Columns,Drop multiples(0,0),Preserve main table order(1));

Close(IR_dt2,No Save);Close(IR_dt,No Save),

value==4,IR_dt=cc<<In New Table("invisible");Column(clmn_nm)<<Set Name(key);IR_dt4=IR_dt<<Join(With(IR_dt3),Merge Same Name Columns,Drop multiples(0,0),Preserve main table order(1));

Close(IR_dt3,No Save);Close(IR_dt,No Save),

value==5,IR_dt=cc<<In New Table("invisible");Column(clmn_nm)<<Set Name(key);IR_dt5=IR_dt<<Join(With(IR_dt4),Merge Same Name Columns,Drop multiples(0,0),Preserve main table order(1));

Close(IR_dt4,No Save);Close(IR_dt,No Save),

value==6,IR_dt=cc<<In New Table("invisible");Column(clmn_nm)<<Set Name(key);IR_dt6=IR_dt<<Join(With(IR_dt5),Merge Same Name Columns,Drop multiples(0,0),Preserve main table order(1));

Close(IR_dt5,No Save);Close(IR_dt,No Save),

value==7,IR_dt=cc<<In New Table("invisible");Column(clmn_nm)<<Set Name(key);IR_dt7=IR_dt<<Join(With(IR_dt6),Merge Same Name Columns,Drop multiples(0,0),Preserve main table order(1));

IR_dt7<<Move Selected Columns({"Chart Type"},To First);IR_dt7<<Move Selected Columns({"Parameter"},To First);Close(IR_dt6,No Save);Close(IR_dt,No Save);

);

),

.........Continued same as above for other Control Charts and concatenated the 7th table of each chart to generate final limit table and closed all other.

)

result_win<<Close Window;

);<<<<<<<Function Ends Here

For(i=1,i<=N Items(unique_val),i++,

disp(unique_val[i],i);

);

** (Might miss some other variables so just to update regarding it)

clmn_nm is a variable which I'm getting from user input using  this

New Window( "Select Process/Parameter Column",<<Modal,Panel Box("Select Columns",clmn=Col List Box(all)));