<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Controlling the .jmp suffix at end of table names in Discussions</title>
    <link>https://community.jmp.com/t5/Discussions/Controlling-the-jmp-suffix-at-end-of-table-names/m-p/438138#M68676</link>
    <description>&lt;P&gt;Hello&amp;nbsp;&lt;a href="https://community.jmp.com/t5/user/viewprofilepage/user-id/3648"&gt;@nikles&lt;/a&gt;,&lt;/P&gt;
&lt;P&gt;This doesn't directly answer your question but I suggest avoiding references to tables by name.&amp;nbsp; &amp;nbsp;The most common issue I see is someone already having a table open with the name you are interested in, or a future change to your script having unintended consequences.&amp;nbsp; Instead, you can save a reference to that table and use that in the rest of your script.&amp;nbsp; If you are counting on the user already having a specific table open, you can search for it. Here are some examples:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;Names default to here(1);

dt1 = Open( "$Sample_data/iris.jmp" );
dt1 &amp;lt;&amp;lt; Set Name("iris2");
dt1 = Open( "$Sample_data/iris.jmp" );
dt2 = Open( "$Sample_data/big class.jmp" );

//Get first matching table
dt3 = filter each({dt}, Get data table list(), Contains(dt &amp;lt;&amp;lt; get Name,"iris"))[1]

//or ask the user which one to use
TableList = filter each({dt}, Get data table list(), Contains(dt &amp;lt;&amp;lt; get Name,"iris"));
winSelectTable = New Window("Which Table?", &amp;lt;&amp;lt; Modal, &amp;lt;&amp;lt; Return Result,
	lbTable = List Box(TableList)
);
dt3 = filter each({dt}, Get data table list(), (dt &amp;lt;&amp;lt; get Name) == winSelectTable["lbTable"][1])[1];

//Now always refer to that table using the table reference
dt3 &amp;lt;&amp;lt; Distribution( Continuous Distribution( Column( :Sepal length ) ) );

//If making new tables in your script, you can usually get those references
//from the functions that create them:
dt4 = (dt3 &amp;lt;&amp;lt; Tabulate(
	Show Control Panel( 0 ),
	Add Table(
		Column Table( Analysis Columns( :Sepal length ) ),
		Row Table( Grouping Columns( :Species ) )
	)
)) &amp;lt;&amp;lt; Make Into Data Table;

dt4 &amp;lt;&amp;lt; Get Name()'&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;n, you can search for it first and then use a reference after that.&amp;nbsp;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Thu, 18 Nov 2021 19:48:31 GMT</pubDate>
    <dc:creator>ih</dc:creator>
    <dc:date>2021-11-18T19:48:31Z</dc:date>
    <item>
      <title>Controlling the .jmp suffix at end of table names</title>
      <link>https://community.jmp.com/t5/Discussions/Controlling-the-jmp-suffix-at-end-of-table-names/m-p/437617#M68644</link>
      <description>&lt;P&gt;Hi. &amp;nbsp;Does anyone know how to control if the ".jmp" extension appears at the end of your table name when opened?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I've noticed when I open some tables it's there, but on other tables, not. &amp;nbsp;I do not know why. &amp;nbsp;I'm writing a script that uses the table name and I need it to be consistent. Is there a preference I can use to control it, or some command? &amp;nbsp;I have considered just arbitrarily stripping the .jmp from all tables if found, but this is not my first preference.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;JMP Pro 15.2.1&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Mac OS Big Sur 11.6&lt;/P&gt;</description>
      <pubDate>Fri, 09 Jun 2023 18:05:36 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Controlling-the-jmp-suffix-at-end-of-table-names/m-p/437617#M68644</guid>
      <dc:creator>nikles</dc:creator>
      <dc:date>2023-06-09T18:05:36Z</dc:date>
    </item>
    <item>
      <title>Re: Controlling the .jmp suffix at end of table names</title>
      <link>https://community.jmp.com/t5/Discussions/Controlling-the-jmp-suffix-at-end-of-table-names/m-p/438138#M68676</link>
      <description>&lt;P&gt;Hello&amp;nbsp;&lt;a href="https://community.jmp.com/t5/user/viewprofilepage/user-id/3648"&gt;@nikles&lt;/a&gt;,&lt;/P&gt;
&lt;P&gt;This doesn't directly answer your question but I suggest avoiding references to tables by name.&amp;nbsp; &amp;nbsp;The most common issue I see is someone already having a table open with the name you are interested in, or a future change to your script having unintended consequences.&amp;nbsp; Instead, you can save a reference to that table and use that in the rest of your script.&amp;nbsp; If you are counting on the user already having a specific table open, you can search for it. Here are some examples:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;Names default to here(1);

dt1 = Open( "$Sample_data/iris.jmp" );
dt1 &amp;lt;&amp;lt; Set Name("iris2");
dt1 = Open( "$Sample_data/iris.jmp" );
dt2 = Open( "$Sample_data/big class.jmp" );

//Get first matching table
dt3 = filter each({dt}, Get data table list(), Contains(dt &amp;lt;&amp;lt; get Name,"iris"))[1]

//or ask the user which one to use
TableList = filter each({dt}, Get data table list(), Contains(dt &amp;lt;&amp;lt; get Name,"iris"));
winSelectTable = New Window("Which Table?", &amp;lt;&amp;lt; Modal, &amp;lt;&amp;lt; Return Result,
	lbTable = List Box(TableList)
);
dt3 = filter each({dt}, Get data table list(), (dt &amp;lt;&amp;lt; get Name) == winSelectTable["lbTable"][1])[1];

//Now always refer to that table using the table reference
dt3 &amp;lt;&amp;lt; Distribution( Continuous Distribution( Column( :Sepal length ) ) );

//If making new tables in your script, you can usually get those references
//from the functions that create them:
dt4 = (dt3 &amp;lt;&amp;lt; Tabulate(
	Show Control Panel( 0 ),
	Add Table(
		Column Table( Analysis Columns( :Sepal length ) ),
		Row Table( Grouping Columns( :Species ) )
	)
)) &amp;lt;&amp;lt; Make Into Data Table;

dt4 &amp;lt;&amp;lt; Get Name()'&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;n, you can search for it first and then use a reference after that.&amp;nbsp;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 18 Nov 2021 19:48:31 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Controlling-the-jmp-suffix-at-end-of-table-names/m-p/438138#M68676</guid>
      <dc:creator>ih</dc:creator>
      <dc:date>2021-11-18T19:48:31Z</dc:date>
    </item>
  </channel>
</rss>

