BookmarkSubscribe
Choose Language Hide Translation Bar
msharp
Super User

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

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 6
txnelson
Super User

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

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.

0 Kudos
ian_jmp
Staff

Re: Clone a Table

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

msharp
Super User

Re: Clone a Table

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

0 Kudos
Craige_Hales
Staff (Retired)

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

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.

0 Kudos