cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Check out the JMP® Marketplace featured Capability Explorer add-in
Choose Language Hide Translation Bar
Jackie_
Level VI

Extract data table tile

HI,

 

I want to extract data table tile and store in the list. I tried get data table list function and was able to store the data table names but the sting contains Data table ("Title"), I only want to store title not the data table().

 

Names Default To Here( 1 );
Open( "$SAMPLE_DATA/Big Class.jmp" );
Open( "$SAMPLE_DATA/Cars.jmp" );
list = Get Data Table List();
title = 
3 REPLIES 3
txnelson
Super User

Re: Extract data table tile

This will get you what you want

Names Default To Here( 1 );
Open( "$SAMPLE_DATA/Big Class.jmp" );
Open( "$SAMPLE_DATA/Cars.jmp" );
list = Get Data Table List();
For Each( {value, index}, list,
	list[index] = Word( 2, Char( value ), "\!"" )
);
Jim
jthi
Super User

Re: Extract data table tile

You can use <<Get Name() on the data table reference to get the table name. To get names of all datatables you can use

Names Default To Here(1);
tablenames = Get Data Table List() << Get Name();

 

jthi_0-1659071371384.png

 

-Jarmo

Re: Extract data table tile

Since the data table references are stored in a list, you can send the << Get Name message to the list and it will distribute the send to each item. The result is a new list of the names.

 

Names Default To Here( 1 );
Open( "$SAMPLE_DATA/Big Class.jmp" );
Open( "$SAMPLE_DATA/Cars.jmp" );
table = Get Data Table List();
name = table << Get Name;

Lists and matrices offer the opportunity to 'vectorize' operations by allowing functions and messages to work on the collection as a whole without the need for explicit iteration in JSL.