- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Get Direct Link
- Report Inappropriate Content
Select Where() not working
I try to append variability chart and selected row of data into journal. But i have problem to append the selected row into journal. Can anyone please advise?
Beside this, i also got another warning error. How i can fix the error?
Cannot find item "Concat" in outline context {"Variability Chart for " || valuesMatrix[i]}
for( i=1, i<=NItems(valuesMatrix), i++,
obj_chart = dt_wo_spec << Variability Chart(
Y( valuesMatrix[i] ),
X( :Product, :Lot, :Wafer Number ),
Connect Cell Means( 1 ),
Std Dev Chart( 0 ),
Show Box Plots( 1 ),
SendToReport(
Dispatch(
{"Variability Chart for " || valuesMatrix[i]},
"Variability Chart",
FrameBox,
{Row Legend( Product, Color( 1 ), Color Theme( "JMP Default" ), Marker( 1 ) )}
)
)
);
lub << append ( Report (obj_chart ));
lub << append( dt_sum << Select Where( :PCM == valuesMatrix[i] ) ); // this part is not working
);
Here is my data table & script
Accepted Solutions
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Get Direct Link
- Report Inappropriate Content
Re: Select Where() not working
I think the problem is with the line after that one. It should read:
ob_sum[Table Box( 1 )] << Set Scrollable( 0, 0 );
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Get Direct Link
- Report Inappropriate Content
Re: Select Where() not working
Hi,
I believe the issue with the line is that, earlier in the code, you reassigned dt_sum to be a DisplayBox. Also, I think we need to define the row as a report if we want to append it to a journal.
I've changed the for-loop as follows:
for( i=1, i<=NItems(valuesMatrix), i++,
obj_chart = dt_wo_spec << Variability Chart(
Y( valuesMatrix[i] ),
X( :Product, :Lot, :Wafer Number ),
Connect Cell Means( 1 ),
Std Dev Chart( 0 ),
Show Box Plots( 1 ),
SendToReport(
Dispatch(
{"Variability Chart for " || valuesMatrix[i]},
"Variability Chart",
FrameBox,
{Row Legend( Product, Color( 1 ), Color Theme( "JMP Default" ), Marker( 1 ) )}
)
)
);
lub << append ( Report (obj_chart ));
lub << append( dt_sum << Select Where( :PCM == valuesMatrix[i])<<Get As Report ) ; // this part is not working
);
I also changed the part where you define dt_sum as follows:
dt_sum = Open( "DSA_ALL.jmp" );
dt_sum << Clear Column Selection();
dt_sum << Clear Select;
ob_sum << Append( dt_sum << Get As Report );
ob_sum[Table Box( 1 )] << Set Scrollable( 0, 0 );
Please try that and let me know if it works.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Get Direct Link
- Report Inappropriate Content
Re: Select Where() not working
Thanks for reply. I try modified the code accordingly. But it is still give me error.
The display box 'BorderBox' does not recognize the message 'Select Where'; perhaps you mean one of these: <<Select <<GetLeft <<Set Color <<Set Style <<Deselect <<Set Dirty <<Selectable <<Set Report Title <<Delete Box <<Delete <<Show Tree Structure <<Get Picture <<Save Text <<Save Picture <<Save Capture <<Set Window Size <<Set Content Size <<Set Print Headers <<Set Page Setup <<Get Web Support <<SetNotStretchable <<Set Auto Centering <<Get Width <<Set Width <<Set Height <<Set Property <<Get Properties <<Set Property <<Get Properties.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Get Direct Link
- Report Inappropriate Content
Re: Select Where() not working
Hi,
I believe that dt_sum is being redefined as a DisplayBox. Can you post your entire modified code? I'll see if I can spot where this is happening.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Get Direct Link
- Report Inappropriate Content
Re: Select Where() not working
here is my modified script. The original script is already upload in my original post with all data tables relevant to the JSL.
Names Default To Here( 1 );
Clear Symbols();
Clear Log();
Close All( Data Tables, NoSave );
Close All( Journals, NoSave );
//dt_sum << clear select;
//Current Data Table( dt_sum );
//dt_sum = Current Data Table();
nw = New Window( "Reports",
<<Journal,
hlb = H List Box(
lub = Lineup Box( N Col( 1 ) )
)
);
lub << Append( tb = Text Box( "PCM DSA report. Updated on : " || Short Date( Today() ) ));
tb << Set Font Size( 14 ) << Set Font Style( "Bold" ) << Justify Text( "center" );
tb << set width(700) << set wrap(700);
lub << Append( ob_sum = Outline Box( "Statistic Summary" ) );
dt_sum = Open( "DSA_ALL.jmp" );
dt_sum << Clear Column Selection();
dt_sum << Clear Select;
ob_sum << Append( dt_sum = Current Data Table() << Get As Report );
dt_sum[Table Box( 1 )] << Set Scrollable( 0, 0 );
lub << Append( Page Break Box() );
lub << Append( ob_biv = Outline Box( "BIV" ) );
//Overview
ob_biv << Append(
Bivariate(
Y( :DSA ),
X( :Ppk of SMIC ),
SendToReport(
Dispatch( {}, "1", ScaleBox, {Add Ref Line( 1.33, "Solid", "Black", "Cpk1.33", 1 )} ),
Dispatch( {}, "2", ScaleBox, {Add Ref Line( 1.5, "Solid", "Black", "DSA1.5", 1 )} ),
Dispatch(
{},
"Bivar Plot",
FrameBox,
{Row Legend(
Zone,
Color( 1 ),
Color Theme( "JMP Default" ),
Marker( 1 ),
Marker Theme( "Standard" ),
Continuous Scale( 0 ),
Reverse Scale( 0 ),
Excluded Rows( 0 )
)}
)
)
)
);
lub << Append( tb1 = Text Box( "Zone1:Cpk<1.33 && DSA>1.5
Zone2:Cpk<1.33 && DSA<1.5
Zone3:Cpk>1.33 && DSA>1.5
Zone4:Cpk>1.33 && DSA<1.5" ) );
tb1 << Set Font Size( 14 ) << Set Font Style( "Bold" ) << Justify Text( "left" );
tb1 << set width(700) << set wrap(700);
lub << Append( Page Break Box() );
//Open limit files to get the parameters into list
dt_limit = Open( "Limit.jmp" );
dt_wo_spec = Open( "JOIN.jmp" );
//Group1
lub << Append( Page Break Box() );
lub << Append( tb2 = Text Box( "Group 1 Parameters : Target process is MF process and test key is the same as MF version" ) );
tb2 << Set Font Size( 14 ) << Set Font Style( "Bold" ) << Justify Text( "Center" );
tb2 << set width(1000) << set wrap(1000);
lub << Append( Page Break Box() );
Current Data Table(dt_limit);
dt_limit << Select Where( :DSA Group == 1 );
//dt_limit << Select Where( as Column("DSA Group") == 1 );
Group1List = :new_name[dt_limit << get selected rows];
Show( Group1List);
for( i=1, i<=NItems(Group1List), i++,
obj_chart_g1 = dt_wo_spec << Variability Chart(
Y( Group1List[i] ),
X( :Product, :Lot, :Wafer Number ),
Connect Cell Means( 1 ),
Std Dev Chart( 0 ),
Show Box Plots( 1 ),
SendToReport(
Dispatch(
{},
"Variability Chart for " || Group1List[i],
OutlineBox,
{Set Title( "Group 1 Variability Chart for " || Group1List[i])}
),
Dispatch(
{"Variability Chart for " || Group1List[i]},
"Variability Chart",
FrameBox,
//{Row Legend( Product, Color( 1 ), Color Theme( "JMP Default" ), Marker( 1 ), Marker Theme( "Standard" ), Continuous Scale( 0 ), Reverse Scale( 0 ), Excluded Rows( 0 ))}
{Row Legend( Product, Color( 1 ), Color Theme( "JMP Default" ), Marker( 1 ), Marker Theme( "Standard" ))}
)
)
);
lub << append ( Report (obj_chart_g1 ));
//lub << append( dt_sum << Select Where( :PCM == Group1List[i] ) ); // this part is not working
lub << append( dt_sum << Select Where( as column("PCM") == Group1List[i] ) <<Get As Report ) ;
);
Reports = Current Journal();
Reports << Set page setup( margins( 0.1, 0.1, 0.1, 0.1 ), scale( 0.8 ), portrait( 0 ), paper size( "A4" ) );
Reports << get page setup();
Reports << SavePDF("DSA_report.pdf");
//Close All( Data Tables, NoSave );
//Close All( Journals, NoSave );
//Exit();
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Get Direct Link
- Report Inappropriate Content
Re: Select Where() not working
Hi,
Lines 25-29 should look like this:
dt_sum = Open( "DSA_ALL.jmp" );
dt_sum << Clear Column Selection();
dt_sum << Clear Select;
ob_sum << Append( dt_sum << Get As Report );
ob_sum[Table Box( 1 )] << Set Scrollable( 0, 0 );
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Get Direct Link
- Report Inappropriate Content
Re: Select Where() not working
Hi Hadley,
After modified the script to below, it give me error. it does not work for me.
ob_sum << Append( dt_sum << Get As Report );
invalid subscript (must be number or list of numbers) in access or evaluation of 'dt_sum[Table Box(1)]' , dt_sum[/*###*/Table Box( 1 )]
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Get Direct Link
- Report Inappropriate Content
Re: Select Where() not working
I think the problem is with the line after that one. It should read:
ob_sum[Table Box( 1 )] << Set Scrollable( 0, 0 );
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Get Direct Link
- Report Inappropriate Content
Re: Select Where() not working
Hi Hadley,
You are right! After i comment out the line, it can work now ! Thanks for input.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Get Direct Link
- Report Inappropriate Content
Re: Select Where() not working
Hi,
Sure thing, happy to have helped.