BookmarkSubscribeRSS Feed
msharp

Super User

Joined:

Jul 28, 2015

Clone a Table

What are some of the ways you guys clone a table?  Is there an easy way to make the tables talk?  Say, changing a value in a cell will update both tables?

1 ACCEPTED SOLUTION

Accepted Solutions
txnelson

Super User

Joined:

Jun 22, 2012

Solution

Re: Clone a Table

The easiest way to do this is using a

   Tables==>Subset

and then select to copy All rows and All Columns, and if you want the table linked, then select the Link to original data table box

The script for this would be:

dt = current data table();

dt << Subset( All rows, Selected columns only( 0 ), Link to original data table( 1 ) );

Jim
6 REPLIES
txnelson

Super User

Joined:

Jun 22, 2012

Solution

Re: Clone a Table

The easiest way to do this is using a

   Tables==>Subset

and then select to copy All rows and All Columns, and if you want the table linked, then select the Link to original data table box

The script for this would be:

dt = current data table();

dt << Subset( All rows, Selected columns only( 0 ), Link to original data table( 1 ) );

Jim
msharp

Super User

Joined:

Jul 28, 2015

Re: Clone a Table

This is it, this is the script that seems to work for my intended purposes.  It's so simple, not sure why I never thought of it before.

ian_jmp

Staff

Joined:

Jun 23, 2011

Re: Clone a Table

FYI, for cloning the table 'dt' you can also use 'Eval(dt << getScript)'.

msharp

Super User

Joined:

Jul 28, 2015

Re: Clone a Table

This is what I was doing.  Great minds think alike right?

Craige_Hales

Staff

Joined:

Mar 21, 2013

Re: Clone a Table

Or if you need a second view of the same data, Window->NewDataView makes a second view, independently scrollable, of the same data.  Updates happen in both views. 

Craige
msharp

Super User

Joined:

Jul 28, 2015

Re: Clone a Table

This is a great feature, thanks for replying.  Also a note, 'dt << New Data View' doesn't create a copy of a private table but does make the private table visible.  Which isn't exactly what I was looking for, but answers a problem I've had for awhile and didn't think there was a solution too.