<?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: Using new :Name() nomenclature with variable in Discussions</title>
    <link>https://community.jmp.com/t5/Discussions/Using-new-Name-nomenclature-with-variable/m-p/365482#M61497</link>
    <description>&lt;P&gt;Running on Windows 10 with JMP 15.2.1 I get the slightly different results&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;Names Default To Here( 1 );
dt = Open( "$SAMPLE_DATA\big class.jmp" );
colName = "height";
Show(
	dt:Height[1],
	dt:Name( "height" )[1],
	dt:"Height"[1],
	dt:"Height"n[1],
	Column( dt, "Height" )[1],
	Column( dt, colName )[1],
	dt:colName[1]
);

dt:colName &amp;lt;&amp;lt; set name( "New Column Name" );&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;Which returns&lt;/P&gt;
&lt;PRE&gt;dt:Height[1] = 59;
dt:height[1] = 59;
dt:Height[1] = 59;
dt:Height[1] = 59;
Column(dt, "Height")[1] = 59;
Column(dt, colName)[1] = 59;
dt:colName[1] = 59;
Scriptable[]&lt;/PRE&gt;
&lt;P&gt;with the data table having the following names after the script was run&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="new.PNG" style="width: 631px;"&gt;&lt;img src="https://community.jmp.com/t5/image/serverpage/image-id/31008i8CE094A7285C9C1B/image-size/large?v=v2&amp;amp;px=999" role="button" title="new.PNG" alt="new.PNG" /&gt;&lt;/span&gt;&lt;/P&gt;</description>
    <pubDate>Fri, 05 Mar 2021 15:19:11 GMT</pubDate>
    <dc:creator>txnelson</dc:creator>
    <dc:date>2021-03-05T15:19:11Z</dc:date>
    <item>
      <title>Using new :Name() nomenclature with variable</title>
      <link>https://community.jmp.com/t5/Discussions/Using-new-Name-nomenclature-with-variable/m-p/365431#M61492</link>
      <description>&lt;P&gt;I am really likeing the shift from :Name("column name") to :"column name"n, especially with how datatables can reference columns easier. But I am having trouble getting it to work when the column name is a variable.&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;dt = currentdatatable();
colName = "Column Name";

//old way works fine
Column(dt,colName) &amp;lt;&amp;lt; set name("new column name");
//if it's not a variable it works
dt:"Column Name"n &amp;lt;&amp;lt; set name("new column name");

//as a variable, the syntax is lost on me
dt:colName &amp;lt;&amp;lt; set name("new column name") // nope
dt:colName||"n" &amp;lt;&amp;lt; set name("new column name") // nope
dt:colName||n &amp;lt;&amp;lt; set name("new column name") // nope&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;I am sure it's something simple ... but it's just not coming to me. The old way works fine so I can still keep scripting away, but this new method is much cleaner, and I'd like to use it everywhere :)&lt;/img&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks!&lt;/P&gt;</description>
      <pubDate>Fri, 09 Jun 2023 22:07:35 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Using-new-Name-nomenclature-with-variable/m-p/365431#M61492</guid>
      <dc:creator>nathan-clark</dc:creator>
      <dc:date>2023-06-09T22:07:35Z</dc:date>
    </item>
    <item>
      <title>Re: Using new :Name() nomenclature with variable</title>
      <link>https://community.jmp.com/t5/Discussions/Using-new-Name-nomenclature-with-variable/m-p/365482#M61497</link>
      <description>&lt;P&gt;Running on Windows 10 with JMP 15.2.1 I get the slightly different results&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;Names Default To Here( 1 );
dt = Open( "$SAMPLE_DATA\big class.jmp" );
colName = "height";
Show(
	dt:Height[1],
	dt:Name( "height" )[1],
	dt:"Height"[1],
	dt:"Height"n[1],
	Column( dt, "Height" )[1],
	Column( dt, colName )[1],
	dt:colName[1]
);

dt:colName &amp;lt;&amp;lt; set name( "New Column Name" );&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;Which returns&lt;/P&gt;
&lt;PRE&gt;dt:Height[1] = 59;
dt:height[1] = 59;
dt:Height[1] = 59;
dt:Height[1] = 59;
Column(dt, "Height")[1] = 59;
Column(dt, colName)[1] = 59;
dt:colName[1] = 59;
Scriptable[]&lt;/PRE&gt;
&lt;P&gt;with the data table having the following names after the script was run&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="new.PNG" style="width: 631px;"&gt;&lt;img src="https://community.jmp.com/t5/image/serverpage/image-id/31008i8CE094A7285C9C1B/image-size/large?v=v2&amp;amp;px=999" role="button" title="new.PNG" alt="new.PNG" /&gt;&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 05 Mar 2021 15:19:11 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Using-new-Name-nomenclature-with-variable/m-p/365482#M61497</guid>
      <dc:creator>txnelson</dc:creator>
      <dc:date>2021-03-05T15:19:11Z</dc:date>
    </item>
    <item>
      <title>Re: Using new :Name() nomenclature with variable</title>
      <link>https://community.jmp.com/t5/Discussions/Using-new-Name-nomenclature-with-variable/m-p/365747#M61522</link>
      <description>&lt;P&gt;I believe that the ""n construction is only intended for when you have need to use a character literal in the statement itself. So, it's not necessary to try to get the ",n" appended to it.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;As for your testing this works for me:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;dt = open("$SAMPLE_DATA/Big Class.jmp");

colName = "height";

dt:colName &amp;lt;&amp;lt; set name("new column name");&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sat, 06 Mar 2021 15:16:37 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Using-new-Name-nomenclature-with-variable/m-p/365747#M61522</guid>
      <dc:creator>Jeff_Perkinson</dc:creator>
      <dc:date>2021-03-06T15:16:37Z</dc:date>
    </item>
    <item>
      <title>Re: Using new :Name() nomenclature with variable</title>
      <link>https://community.jmp.com/t5/Discussions/Using-new-Name-nomenclature-with-variable/m-p/365750#M61523</link>
      <description>Jeff,&lt;BR /&gt;I have done multiple searches in an effort to find the documentation on ""n documentation.  Do you have the specific reference on it?</description>
      <pubDate>Sat, 06 Mar 2021 15:33:28 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Using-new-Name-nomenclature-with-variable/m-p/365750#M61523</guid>
      <dc:creator>txnelson</dc:creator>
      <dc:date>2021-03-06T15:33:28Z</dc:date>
    </item>
    <item>
      <title>Re: Using new :Name() nomenclature with variable</title>
      <link>https://community.jmp.com/t5/Discussions/Using-new-Name-nomenclature-with-variable/m-p/365751#M61524</link>
      <description>&lt;P&gt;After some googling figured out at least one place where I had seen that syntax before:&lt;/P&gt;&lt;P&gt;&lt;A href="https://community.jmp.com/t5/Discovery-Summit-Americas-2020/Automating-the-Data-Curation-Workflow-2020-US-45MP-620/ta-p/281547" target="_self"&gt;Automating the Data Curation Workflow (2020-US-45MP-620)&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;which provides link to here:&lt;/P&gt;&lt;P&gt;&lt;A href="https://www.jmp.com/support/help/en/16.0/?os=win&amp;amp;source=application#page/jmp/names.shtml" target="_self"&gt;JMP16.0 - JSL Syntax Guide - Names&lt;/A&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sat, 06 Mar 2021 15:59:30 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Using-new-Name-nomenclature-with-variable/m-p/365751#M61524</guid>
      <dc:creator>jthi</dc:creator>
      <dc:date>2021-03-06T15:59:30Z</dc:date>
    </item>
    <item>
      <title>Re: Using new :Name() nomenclature with variable</title>
      <link>https://community.jmp.com/t5/Discussions/Using-new-Name-nomenclature-with-variable/m-p/366567#M61631</link>
      <description>&lt;P&gt;Thanks&amp;nbsp;&lt;a href="https://community.jmp.com/t5/user/viewprofilepage/user-id/2687"&gt;@txnelson&lt;/a&gt;&amp;nbsp;and&amp;nbsp;&lt;a href="https://community.jmp.com/t5/user/viewprofilepage/user-id/6878"&gt;@Jeff_Perkinson&lt;/a&gt;&amp;nbsp;... That is definitely a simple fix :)&lt;/img&gt;&lt;BR /&gt;&lt;BR /&gt;I feel I ran into troubles with that a while ago and never thought to try it again!&lt;/P&gt;</description>
      <pubDate>Tue, 09 Mar 2021 19:37:49 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Using-new-Name-nomenclature-with-variable/m-p/366567#M61631</guid>
      <dc:creator>nathan-clark</dc:creator>
      <dc:date>2021-03-09T19:37:49Z</dc:date>
    </item>
    <item>
      <title>Re: Using new :Name() nomenclature with variable</title>
      <link>https://community.jmp.com/t5/Discussions/Using-new-Name-nomenclature-with-variable/m-p/754471#M93659</link>
      <description>&lt;P&gt;When was&amp;nbsp; the &lt;FONT face="courier new,courier"&gt;:columnName&lt;/FONT&gt; syntax introduced?&lt;BR /&gt;Is there further documentation why the same syntax was used for a) the Column object and b) the "As Column" reference, e.g. inside a formula?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Why does Name Expr (As Column()) return the :column Name thing - which again can be used for both purposes?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 14 May 2024 21:20:08 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Using-new-Name-nomenclature-with-variable/m-p/754471#M93659</guid>
      <dc:creator>hogi</dc:creator>
      <dc:date>2024-05-14T21:20:08Z</dc:date>
    </item>
  </channel>
</rss>

