Choose Language Hide Translation Bar
Community Trekker

Exporting table properties to a datatable

I have a data table with rows of different parts and each column are various tests for each part.  The spec limits for each column are embedded spec limits in each column property.  I would like to create a data table where each row is now the parameter, with a column of USL, LSL and mean of each parameter.

Not sure how to do this, any help would be appreciated.

0 Kudos
Super User

Re: Exporting table properties to a datatable

Here's one way with JSL.

dt = open("$SAMPLE_DATA\Big");

Column(dt, "height")<< Set Property("Spec LImits", {LSL( 61 ), USL( 65 ), Target( 63 ), Show Limits( 0 )});

Column(dt, "height")<< Set Property("Spec LImits", {LSL( 70 ), USL( 120 ), Target( 90 ), Show Limits( 0 )});

col_names = dt << Get Column Names;

dt_new = New Table("Spec Limits", New Column("Test", Character), New Column("LSL")

       , New Column("Target"), New Column("USL")


for(i=1, i<=nitems(col_names), i++,

       sls = column(dt, col_names)<<Get Property("Spec Limits");


              dt_new << Add Rows({:Test = char(col_names), :LSL = sls["LSL"],

                     :Target = sls["Target"], :USL = sls["USL"]





If you're getting the spec limits from capability analysis you can also get it from the hot button


Vince Faller - Predictum

Re: Exporting table properties to a datatable

I had some old code pretty much the same as that from vince.faller0​ above. So I added a couple of lines to also give the mean.

0 Kudos