Hello everyone,
I hope you're doing well. I'm facing an issue creating a script to generate a Pareto plot from a table that I want to filter by dates (date1 and date2).
As a first step, I called my table using:
dt2 = Open( "/D:/Project JMP/Tables/Table NOK PY.jmp", invisible );
Next :
dt2_top5 = dt2 << Summary(
Group( :Date, :Ref Produit, :ProductName, :Baie, :ICT_FCT, :CodeError),
Freq( "Aucun(e)" ),
Weight( "Aucun(e)" ),
output table name( "Table2 Top 5" ),
invisible
);
// Subset of data for Pareto plot filtered by Date
dt_pareto_subset = dt2_top5 << Select Where( Num( Char( :Date ) ) >= Num( date1 ) & Num( Char( :Date ) ) < Num( date2 ) );
dt_pareto_subset = dt2_top5 << Subset(
Selected Rows(1),
Columns(:CodeError),
output table name("Pareto Subset"),
invisible
);and i did creat the Pareto plot in my window :
Border Box(Left(25), Top(50), Bottom(200),
V List Box(
// Add the Pareto plot here
paretoPlot = dt_pareto_subset << Pareto Plot(
Y( :CodeError ),
Freq( "Freq" ),
Show Percents( 1 ),
Show Cumulative Line( 1 )
),
)
)
but after i lanched my script i did get this error :

The script object is expected when accessing or evaluating "Send", dt_pareto_subset << /*###*/
Pareto Plot(
Y(:CodeError),
Freq("Freq"),
Show Percents(1),
Show Cumulative Line(1)
)/*###*/
I have a small code snippet that generates a Pareto plot. Currently, I have to manually select the data table each time, and I cannot apply a date filter :
Pareto Plot(
Cause( :CodeError ),
SendToReport(
Dispatch( {"Plots"}, "Pareto Report", FrameBox, {Frame Size( 1555, 725 )} )
)
);
Thank you all for your help,
Best regards,
Yass