BookmarkSubscribeRSS Feed
thickey1

Community Trekker

Joined:

Jun 4, 2015

How to prevent locking columns when making a summary table

I create A summary table as follows but it puts the Lock Symbol on the columns in the summary table.

 

FAILS_SUM = FAILS << Summary(

    Group( :Lot, :Wafer, :Part, :End_Date, :X, :Y ),

    linkToOiginalDataTable(0),

    outputTableName(FAILS<<getName() || "_SUMMARY"),

    invisible

);

 

 

 

 

 

I programmatically unlock the columns using

 

colNames = FAILS_SUMMARY << getColumnNames();

for(i=1, i<=nItems(colNames),i++,

  column(colNames) << setLock(0);

);

 

 

 

 

 

 

 

Grouping column 'Lot' is dissociated from its source column.

 

Grouping column 'Wafer' is dissociated from its source column.

 

Grouping column 'X' is dissociated from its source column.

 

Grouping column 'Y' is dissociated from its source column.

 

Grouping column 'Part' is dissociated from its source column.

 

Grouping column 'End_Date' is dissociated from its source column.

 

 

What are the criteria for which JML/JSL locks columns when creating a summary table?

What does the Warning I get mean!

 

How do I cleanly either A) Not lock the columns or B) Unlock Them?

 

Troy

2 ACCEPTED SOLUTIONS

Accepted Solutions
ms

Super User

Joined:

Jun 23, 2011

Solution

Re: Locking columns when making a summary table

A summary table is linked to the original by default and therefore the columns are locked.

It is possible to create an unlinked table with unlocked columns using Summary (see JSL example below) or Tabulate (output table from << Make Into Data Table should have unlocked columns).

​.


Current data table() << Summary( Group( :age ), Mean( :height ),

Link to original data table( 0 ));

David_Burnham

Super User

Joined:

Jul 13, 2011

Solution

Re: Locking columns when making a summary table

... which makes sense except that Troy has "linkToOiginalDataTable(0)" in his code !

It looks like a typo:  "Oiginal" !!

-Dave
3 REPLIES
ms

Super User

Joined:

Jun 23, 2011

Solution

Re: Locking columns when making a summary table

A summary table is linked to the original by default and therefore the columns are locked.

It is possible to create an unlinked table with unlocked columns using Summary (see JSL example below) or Tabulate (output table from << Make Into Data Table should have unlocked columns).

​.


Current data table() << Summary( Group( :age ), Mean( :height ),

Link to original data table( 0 ));

David_Burnham

Super User

Joined:

Jul 13, 2011

Solution

Re: Locking columns when making a summary table

... which makes sense except that Troy has "linkToOiginalDataTable(0)" in his code !

It looks like a typo:  "Oiginal" !!

-Dave
bswedlove

Community Trekker

Joined:

Nov 2, 2016

Re: How to prevent locking columns when making a summary table

You can unlock a column with this code:

dt:Column<<lock(0);