<?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: How to set object name based on table name? in Discussions</title>
    <link>https://community.jmp.com/t5/Discussions/How-to-set-object-name-based-on-table-name/m-p/317051#M56841</link>
    <description>&lt;P&gt;Here is a simple script that does creates the variables for each of the data tables open in the JMP session&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;Names Default To Here( 1 );
For( i = 1, i &amp;lt;= N Table(), i++,

theName = data table(i) &amp;lt;&amp;lt; get name; 

	Eval(
		Substitute(
				Expr(
					__name__ = Data Table( i )
				),
			Expr( __name__ ), Parse(theName)
		)
	)
);&lt;/CODE&gt;&lt;/PRE&gt;</description>
    <pubDate>Mon, 05 Oct 2020 18:32:43 GMT</pubDate>
    <dc:creator>txnelson</dc:creator>
    <dc:date>2020-10-05T18:32:43Z</dc:date>
    <item>
      <title>How to set object name based on table name?</title>
      <link>https://community.jmp.com/t5/Discussions/How-to-set-object-name-based-on-table-name/m-p/316987#M56840</link>
      <description>&lt;P&gt;I have several data tables with different names. I want to open the data tables and set the object name to be the same as the file name.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Here's an idea of it. The end goal is to have an object called "Animals" that points to "Animals.jmp".&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;Names Default To Here( 1 );
dt = Open( "$SAMPLE_DATA/Animals.jmp" );
Create Object (char(dt)) &amp;lt;&amp;lt; dt;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Sat, 10 Jun 2023 23:19:57 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/How-to-set-object-name-based-on-table-name/m-p/316987#M56840</guid>
      <dc:creator>Sam1</dc:creator>
      <dc:date>2023-06-10T23:19:57Z</dc:date>
    </item>
    <item>
      <title>Re: How to set object name based on table name?</title>
      <link>https://community.jmp.com/t5/Discussions/How-to-set-object-name-based-on-table-name/m-p/317051#M56841</link>
      <description>&lt;P&gt;Here is a simple script that does creates the variables for each of the data tables open in the JMP session&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;Names Default To Here( 1 );
For( i = 1, i &amp;lt;= N Table(), i++,

theName = data table(i) &amp;lt;&amp;lt; get name; 

	Eval(
		Substitute(
				Expr(
					__name__ = Data Table( i )
				),
			Expr( __name__ ), Parse(theName)
		)
	)
);&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Mon, 05 Oct 2020 18:32:43 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/How-to-set-object-name-based-on-table-name/m-p/317051#M56841</guid>
      <dc:creator>txnelson</dc:creator>
      <dc:date>2020-10-05T18:32:43Z</dc:date>
    </item>
  </channel>
</rss>

