cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
  • Learn how to build custom Python data connectors and further customize JMP’s Data Connector Framework with the Python Data Connector Demo, available now in the JMP Marketplace!
  • Learn some foundational elements of JMP Scripting Language (JSL) and how to extend point & click automation into repeatable, shareable routines. Register. June 26, 2 p.m. US Eastern Time.

Discussions

Solve problems, and share tips and tricks with other JMP users.
Choose Language Hide Translation Bar
jueefo
Level II

Datatable script to get data on the original datatable

Hi,

 

I have created an empty datatable and a script in it. The script gets data from the database, but it will open a new datatable for the data.

Is it possible and how to open the data in the original datatable which has the script?

 

 

The JMP version used 15.2 is.

 

1 ACCEPTED SOLUTION

Accepted Solutions
ih
Super User (Alumni) ih
Super User (Alumni)

Re: Datatable script to get data on the original datatable

Is there a reason you want the original script in a datatable?  You could save your script as a .jsl file and have that open the new data and add any new columns/scripts to it.  You can also have the script run automatically and close itself after the table is created.

 

If there is another reason to run it from a table, you can concatenate or join the new data back to your original table.

dtCurrent = Current Data Table();

dtNew = Open( .. some database query ..);

dtCurrent << Concatenate( dtNew, Append to first table );

dtNew << Close Window;

View solution in original post

2 REPLIES 2
ih
Super User (Alumni) ih
Super User (Alumni)

Re: Datatable script to get data on the original datatable

Is there a reason you want the original script in a datatable?  You could save your script as a .jsl file and have that open the new data and add any new columns/scripts to it.  You can also have the script run automatically and close itself after the table is created.

 

If there is another reason to run it from a table, you can concatenate or join the new data back to your original table.

dtCurrent = Current Data Table();

dtNew = Open( .. some database query ..);

dtCurrent << Concatenate( dtNew, Append to first table );

dtNew << Close Window;
jueefo
Level II

Re: Datatable script to get data on the original datatable

Thanks, that works!

The question why to use a datatable instead of the .jsl file is very good. And I do not have a good answer. I am just starting with jsl-scripts, so I might be using not so good methods. I will rethink how to do this.

Recommended Articles