cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Browse apps to extend the software in the new JMP Marketplace
Choose Language Hide Translation Bar
hogi
Level XII

get main data table()

For linked data tables (either summary tables or linked subsets),  CTRL + ALT + D  or a click on 

hogi_0-1721487935404.png

will take me to the "main" table 

This is very convenient. Great that JMP is willing to share this knowledge.
To make the most of it:

Is there a JSL function to get the main table?

 

As of JMP18, there is a new function called is linked subset() that can be used to check if a data table is a linked subset.
https://community.jmp.com/t5/Discussions/How-to-know-if-a-table-is-a-linked-subset/m-p/619442/highli... 

Due to the fact that this function is brand new, I am afraid that the answer to the posted question is:

No ...

Application Case:
Just imagine how often you generate a report from a summary table - and then face the difficulty how to save the script.
Actually, it's just a combination of 

a) the source script for the summary table

b) the source script of the report
but it requires ~ 20 mouse clicks to save the combined script to the main table.

If there is a way to get the main table - all this could be triggered by a single click on a toolbar. cool!

1 ACCEPTED SOLUTION

Accepted Solutions
hogi
Level XII

Re: get main data table()

Ah, one can talk to enhanced log  and ask there ...
Thanks, @jthi : )

Anyway, a JSL function would be nice ...

View solution in original post

6 REPLIES 6
jthi
Super User

Re: get main data table()

If you are scripting you should know the references, there is also << Get Data Table() for reports.

Names Default To Here(1);
dt = Open("$SAMPLE_DATA/Big Class.jmp");
gb = Graph Builder(
	Variables(X(:height), Y(:weight)),
	Elements(Points(X, Y), Smoother(X, Y))
);

dt_ref = gb << get data table();

If you wish to have the script in the original data table, you would use Save Script to Source Table

jthi_0-1721490087159.png

 

-Jarmo
hogi
Level XII

Re: get main data table()

Hm,
unfortunately, << get data table() just seem to work for reports (like you say) , but not for linked summary tables and subsets (what I need) :

same mouse click on the GUI , but JSL is not 1:1:

dt = Open( "$SAMPLE_DATA/Big Class.jmp" );

dtsummary = dt << Summary(Group( :height ));
dtsub = dt<< Subset( All rows, Selected columns only( 0 ) );

maintable = dtsummary << get data table(); // doesn't work
maintable = dtsub << get data table(); // doesn't work


so: no?

jthi
Super User

Re: get main data table()

For interactive usage you would use Workflow builder (or enhanced log) to make it fairly simple. For scripting, currently, you would have to parse Source Script or Linked Subset table variable (doesn't exist for Summary) if you don't want to utilize references. There should be << Get Original Data Table (should have been added when << Is Linked Subset was added) but currently we don't have one.

-Jarmo
hogi
Level XII

Re: get main data table()

Agree, here is the wish: message: get data table() ... for linked summary and subset tables 

yes, maybe: "get original data table". Let's see which name developers will pick ...

jthi
Super User

Re: get main data table()

Original Data Table is the name which is used in both Summary and Subset platforms as the named parameter is "Link to original data table", so I think it would be nice to have some consistency (main data table could be other option but then all the original data tables should be updated), but we will see.

https://www.jmp.com/support/help/en/18.0/#page/jmp/create-a-subset-data-table.shtml

jthi_0-1721583498111.png

-Jarmo
hogi
Level XII

Re: get main data table()

Ah, one can talk to enhanced log  and ask there ...
Thanks, @jthi : )

Anyway, a JSL function would be nice ...