cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Try the Materials Informatics Toolkit, which is designed to easily handle SMILES data. This and other helpful add-ins are available in the JMP® Marketplace
Choose Language Hide Translation Bar
abmayfield
Level VI

Referencing a table that is created via "make into data table"

I have a quandary that mainly gets back to generalizing a workflow (which I discussed at length with Jordan Hiller). In the attached workflow, there is a key step in which analytes identified by one platform are placed into a new data table via the "make into data table" command. The issue is that, as far as I can tell, I cannot script it to where a specific name is given to the resulting table; it will simply be called untitled 1 (or higher, depending on how many windows I have open). At the very end of the script in question:

"Make Combined Data Table;

obj << Close Window;")

could I simply add a line to give the to-be-created data table a name? If so, then I could correctly "call" this table in subsequent steps. I think you will have a better idea of what I mean when you run the Workflow package.

Anderson B. Mayfield
1 ACCEPTED SOLUTION

Accepted Solutions
jthi
Super User

Re: Referencing a table that is created via "make into data table"

For me it did finish correctly after the modifications

jthi_0-1691780036555.png

Of course I'm not sure if it is doing what it is supposed to

-Jarmo

View solution in original post

8 REPLIES 8
jthi
Super User

Re: Referencing a table that is created via "make into data table"

One thing you could try is to add table reference to your Local variables and use that reference to store the table you create. Then use << Set Name to rename it in the same step. This seems to also work

Names Default To Here(1);


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

dist = dt << Run Script("Distribution");

(Report(dist)["Distributions", "weight", "Quantiles", Table Box(1)] << Make Combined Data Table()) << Set Name("TABLE NAME");

but I'm not sure if these ideas will work correctly in Workflows.

Step 6

jthi_0-1691513459415.png

and then remove the rename step after

 

Edit:

Created quick wish list item to allow choosing name of those result tables Allow user to choose name of result table when using Make Combined Data Table or Make into Data Tabl...

-Jarmo
abmayfield
Level VI

Re: Referencing a table that is created via "make into data table"

Thanks! I'm going to try this here in the next few days and report back.

Anderson B. Mayfield
abmayfield
Level VI

Re: Referencing a table that is created via "make into data table"

And the answer is: yes and no. Yes, you can insert "Set name("new table name")" into the script in question, and it WILL correctly name the new table. Strangely, though, it still causes an error in the workflow that is UNrelated to the fact that the table name has changed (which is easy to modify). "Name unresolved obj" is the error. There might be a way to circumvent this but regardless, I think it was worth putting in a Wishlist request, and I imagine this would be a relatively easy fix/update.

Anderson B. Mayfield
jthi
Super User

Re: Referencing a table that is created via "make into data table"

For me it did finish correctly after the modifications

jthi_0-1691780036555.png

Of course I'm not sure if it is doing what it is supposed to

-Jarmo
hogi
Level XII

Re: Referencing a table that is created via "make into data table"

if you just want to reference the table later, you could store a reference to the table as a JSL symbol

 

 

dt = Open( "$SAMPLE_DATA/Big Class.jmp" );
dist= Distribution(
	Continuous Distribution(
		Column( :weight ),
		Horizontal Layout( 1 ),
		Vertical( 0 ),
		Normal Quantile Plot( 1 )
	)
);
myTable = Report(dist)["Distributions", "weight", "Quantiles", Table Box(1)] << make into data table();
myTable << get name()

 

 

abmayfield
Level VI

Re: Referencing a table that is created via "make into data table"

Awesome! You are correct. Your original idea DID work. When I went into the workflow to modify them per your original suggestion, I had forgotten a parentheses () which caused mine to run, albeit with errors. Upon perusing your modifications, I saw where I made the JSL mistake and now it works. Based on the comments below, it looks like there are other ways of getting to the same point (common in JMP!), so I might tinker with them, as well. Thank you to everyone for your suggestions. Likely an easy fix for anyone remotely familiar with JSL (which I am unfortunately not).

Anderson B. Mayfield
David_Burnham
Super User (Alumni)

Re: Referencing a table that is created via "make into data table"

I would have thought that once you "make" the new data table it is now the current data table so you could do:

 

dtMake = Current Data Table();

or better still, try assigning the variable as part of sending the make message as suggested by @hogi 

-Dave

Re: Referencing a table that is created via "make into data table"

@abmayfield I received the TS track you sent in requesting that maybe this be considered -- to add the ability from the platforms to add an output table name from the "make into data table" selection. Just a note here -- I replied to you, a work around to create a table name with your script.  And I have also filed a request with development to consider adding this ability to JMP.