assigned spec limits from limits columnHi,
I have a data table with the following columns, how can I assign the limits to the value column as property?
meaning when I plot value by date ill see those limits automatically

I tried
:value << set property(
"spec limits",
{LSL( : LCL ) , USL( : UCL ), Target( : Target ), Show Limits( 1 )}
);thanks!
Re: assigned spec limits from limits columnThe information from this track is assuminging 2 data tables are open in your JMP session. A data table containing the measurement data, and a second table containing Spec LImits. Your Open() function is opening an Excel file called "Data.xlsx. Is this your measurement data or your limits data? In either case, you can not interject into the Open() function, the JSL that modifies the Spec Limits. Both the measurement table and the table that has the limits in it, has to be completly read in, and then the limits update code needs to be applied.
Re: assigned spec limits from limits columnHello @txnelson ,
I am somewhat new to JMP. Where would I put this code? The following is the script in the Source.
Open(
"Data.xlsx",
Worksheets( {"Sheet2"} ),
Use for all sheets( 1 ),
Concatenate Worksheets( 1 ),
Create Concatenation Column( 1 ),
Worksheet Settings(
1,
Has Column Headers( 1 ),
Number of Rows in Headers( 1 ),
Headers Start on Row( 1 ),
Data Starts on Row( 2 ),
Data Starts on Column( 1 ),
Data Ends on Row( 0 ),
Data Ends on Column( 0 ),
Replicated Spanned Rows( 1 ),
Replicated Spanned Headers( 0 ),
Suppress Hidden Rows( 1 ),
Suppress Hidden Columns( 1 ),
Suppress Empty Columns( 1 ),
Treat as Hierarchy( 0 ),
Multiple Series Stack( 0 ),
Import Cell Colors( 0 ),
Limit Column Detect( 0 ),
Column Separator String( "-" ),
Eval(
Substitute(
Expr(
:value << set property(
"spec limits",
{LSL( __LSL__ ), USL( __USL__ ), ., Show Limits( 1 )}
)
),
Expr( __LSL__ ), :LSL[10],
Expr( __USL__ ), :USL[7],
)
)
)
)
This isn't working for me. Trying to debug the script causing a break, no matter where I put a breakpoint. Any help would be appreciated.
Re: assigned spec limits from limits columnGladly! Ever had Ardbeg Uigeadail? Are you coming to Discovery 2018 in Cary?
Re: assigned spec limits from limits column1 Single Malt Scotch == 2 Beers
Re: assigned spec limits from limits columnJim:
Thanks! I now owe you two beers
.
One of these days I will have to confromt my fear of Eval / Expr / Substitute
Re: assigned spec limits from limits columnHere is a simple script that will set the Show Limits without deleting the already set limits
Names Default To Here( 1 );
dt = Open( "$SAMPLE_DATA\Semiconductor Capability.jmp" );
mycols = dt << Get Column Names( numeric, string );
For( i = 1, i <= N Items( mycols ), i++,
spec = Column( dt, mycols[i] ) << Get Property( "Spec Limits" );
If( Is Empty( spec ) == 0,
LSL = Try( spec["LSL"], . );
USL = Try( spec["USL"], . );
Target = Try( spec["Target"], . );
Eval(
Substitute(
Expr(
Column( dt, mycols[i] ) <<
Set Property(
"Spec Limits",
{LSL( __LSL__ ), USL( __USL__ ),
Target( __Target__ ), Show Limits( 1 )}
),
),
Expr( __LSL__ ), LSL,
Expr( __USL__ ), USL,
Expr( __Target__ ), Target
)
);
);
);Re: assigned spec limits from limits columnAdam:
My application was to be able to toggle the 'Show as graph reference lines' for Spec Limits. After doing Process Capability, loading spec limits from a table, then saving them to columm property I noticed that none of the columns had the 'Show as graph reference lines' checked. For 55 columns I did not want to do this manually (but I did - I searched the documentation but could find out how to do this). Now I have JSL that can do it. Change the (1) to a (0) to toggle. You want to see the Spec Limit lines for some plots, but not others.
Names Default To Here( 1 );
dt = Current Data Table();
mycols = dt << Get Column Names( string );
For( i = 2, i <= N Items( mycols ), i++,
Column( i ) << Set Property( "Spec Limits", {Show Limits(1)} );
);
So, this JSL will toggle the Show Limits(), but it will wipe out the LSL(), Target(), USL() assigned to the column.
Does anyone out there have a way to only toggle the Show Limits()?
Re: assigned spec limits from limits columnNot working for me,
Did you mean as in the example?
biv=Bivariate(
Y( :VALUE ),
X( :DATE ),
By(
:TEST
)
);
biv << Show Limits(1);
Re: assigned spec limits from limits columnShow Limits(1) - I was searching around the scripting guide yesterday on how do this to a bunch of columns. Thanks!Re: assigned spec limits from limits columnHi,
Thanks for the solution for the original question.
I have another question regarding the same issue/example.
Can I create a smart column property or trend chart property so that when I create a trend chart using jsl the limits will be included.
I think there need to be something because I have value and limits in every row.Re: assigned spec limits from limits columnYour example data table does not contain any columns named LSL or USL. Assuming they do exist, but are just missing from the display your code remains with a couple of problems. First, you are attempting to insert values into a list structure.
{LSL( : LSL ) , USL( : USL ), Target( : Target ), Show Limits( 1 )}
Because this is a list, it will not parse and evaluate itself.
The second item, is that, Spec Limits is a column property, and therefore, only 1 set of Spec Limits can be set for your column :Value. If you have a columns named :LSL, :Target and :USL, you will need to specify which row in the data table contains those limits. Below is one method that can be used to add the Spec Limits. In the code, I am assuming there are columns of :USL, :Target and :USL, and that row 5 contains the values you want to use.
Eval(
Substitute(
Expr(
:value << set property(
"spec limits",
{LSL( __LSL__ ), USL( __USL__ ), Target( __Target__ ), Show Limits( 1 )}
)
),
Expr( __LSL__ ), :LSL[5],
Expr( __USL__ ), :USL[5],
Expr( __Target__ ), :Target[5]
)
);