Subscribe Bookmark RSS Feed

Data Table from Private to Visible

laisteve17

Occasional Contributor

Joined:

Jun 15, 2017

How do I show (in a window) a data table that was opened as Private?

 

I understand that private objects do not have windows associated with them. I generate many tables and I am optimizing my script by keeping them private. My question is, how do I add a private data table to a window and display it like a typical data table? I want the same functionality as if it were opened as Visible.

 

Thank you in advance!

1 ACCEPTED SOLUTION

Accepted Solutions
Eric_Hill

Staff

Joined:

Oct 1, 2013

Solution

Hey,

Specifically to Jim's point, do this:

dtPrivate = Open("$SAMPLE_DATA\Big Class.jmp", Private);

/*...*/

dtVisible = dt << Subset( Link To Original Data Table(1) );

Any changes you make to the visible version of the table will be reflected in the private table, since the visible table is merely a link to the private table.

HTH,

Eric

3 REPLIES
txnelson

Super User

Joined:

Jun 22, 2012

You will have to create a subset of the data table to either an invisible or visible state.

Jim
Eric_Hill

Staff

Joined:

Oct 1, 2013

Solution

Hey,

Specifically to Jim's point, do this:

dtPrivate = Open("$SAMPLE_DATA\Big Class.jmp", Private);

/*...*/

dtVisible = dt << Subset( Link To Original Data Table(1) );

Any changes you make to the visible version of the table will be reflected in the private table, since the visible table is merely a link to the private table.

HTH,

Eric

Justin_Chilton

Joined:

Aug 27, 2015

This can be done without creating a subset using the New Data View message. I used this method in my Word Import Tool add-in.

dt = Open( "$SAMPLE_DATA\Big Class.jmp", "private" );

dt << New Data View;
Justin