<?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 do I name data table after a cell value in Discussions</title>
    <link>https://community.jmp.com/t5/Discussions/How-do-I-name-data-table-after-a-cell-value/m-p/311517#M56460</link>
    <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;One way to achieve what you're after may be to first capture the value of the date from one of the tables in a separate variable:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;dt=data table ("Name of First Table");&lt;BR /&gt;date=Format(Column(dt,"Name of Date Column")[1],"dd.mm.yyy");&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;After the join, you can rename the table using the "set name" argument:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;joined_table=dt&amp;lt;&amp;lt;join(...);
joined_table&amp;lt;&amp;lt;set name(date || " Date 1 and 2");&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;Please try that and let us know if it works for you.&lt;/P&gt;</description>
    <pubDate>Wed, 23 Sep 2020 11:29:19 GMT</pubDate>
    <dc:creator>HadleyMyers</dc:creator>
    <dc:date>2020-09-23T11:29:19Z</dc:date>
    <item>
      <title>How do I name data table after a cell value</title>
      <link>https://community.jmp.com/t5/Discussions/How-do-I-name-data-table-after-a-cell-value/m-p/311496#M56457</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have a simple script that combines relevant columns from two data sets, matching by data.&lt;/P&gt;&lt;P&gt;For each batch of data, the column Date contains the same value in every row.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;My script includes:&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Output Table( "Data 1 and 2"))&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;How would I append a value from the Date column in front of the string, so that the table becomes, for example, "23.09.20 Data 1 and 2".&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you.&lt;/P&gt;</description>
      <pubDate>Sat, 10 Jun 2023 23:19:22 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/How-do-I-name-data-table-after-a-cell-value/m-p/311496#M56457</guid>
      <dc:creator>HarriBradbeer</dc:creator>
      <dc:date>2023-06-10T23:19:22Z</dc:date>
    </item>
    <item>
      <title>Re: How do I name data table after a cell value</title>
      <link>https://community.jmp.com/t5/Discussions/How-do-I-name-data-table-after-a-cell-value/m-p/311517#M56460</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;One way to achieve what you're after may be to first capture the value of the date from one of the tables in a separate variable:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;dt=data table ("Name of First Table");&lt;BR /&gt;date=Format(Column(dt,"Name of Date Column")[1],"dd.mm.yyy");&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;After the join, you can rename the table using the "set name" argument:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;joined_table=dt&amp;lt;&amp;lt;join(...);
joined_table&amp;lt;&amp;lt;set name(date || " Date 1 and 2");&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;Please try that and let us know if it works for you.&lt;/P&gt;</description>
      <pubDate>Wed, 23 Sep 2020 11:29:19 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/How-do-I-name-data-table-after-a-cell-value/m-p/311517#M56460</guid>
      <dc:creator>HadleyMyers</dc:creator>
      <dc:date>2020-09-23T11:29:19Z</dc:date>
    </item>
    <item>
      <title>Re: How do I name data table after a cell value</title>
      <link>https://community.jmp.com/t5/Discussions/How-do-I-name-data-table-after-a-cell-value/m-p/311518#M56461</link>
      <description>&lt;P&gt;Here is an example of how to do this&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;names default to here(1);
dt = open("$SAMPLE_DATA/big class.jmp");

dt &amp;lt;&amp;lt; set name("Data 1 and 2");

// Create a Date column;()
dt &amp;lt;&amp;lt; new column("Date", formula(today()),format("m/d/y"));

// Rename the data table
dt &amp;lt;&amp;lt; set name(char(month(:Date[1])) || "." || char(day(:date[1])) ||
     "." || char(year(:Date[1])) || " " || char(dt &amp;lt;&amp;lt; get name) );&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Wed, 23 Sep 2020 11:48:10 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/How-do-I-name-data-table-after-a-cell-value/m-p/311518#M56461</guid>
      <dc:creator>txnelson</dc:creator>
      <dc:date>2020-09-23T11:48:10Z</dc:date>
    </item>
  </channel>
</rss>

