<?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: Refer to Columns in other Data Table using Formula in Column Names in Discussions</title>
    <link>https://community.jmp.com/t5/Discussions/Refer-to-Columns-in-other-Data-Table-using-Formula-in-Column/m-p/438259#M68689</link>
    <description>&lt;P&gt;Given the attached data table, the following JSL works.&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;dt=current data table();
list=dt&amp;lt;&amp;lt; get column names(String);
//col="delay"||Substr(char(list[1]), 3,Length( char(list[1]))-4);
col=list[1];
//a=dt:name(char(col))[15]-dt:name(char(col))[25]
a=column(dt,col)[15]-column(dt,col)[25];&lt;/CODE&gt;&lt;/PRE&gt;</description>
    <pubDate>Fri, 19 Nov 2021 03:36:46 GMT</pubDate>
    <dc:creator>txnelson</dc:creator>
    <dc:date>2021-11-19T03:36:46Z</dc:date>
    <item>
      <title>Refer to Columns in other Data Table using Formula in Column Names</title>
      <link>https://community.jmp.com/t5/Discussions/Refer-to-Columns-in-other-Data-Table-using-Formula-in-Column/m-p/438221#M68687</link>
      <description>&lt;P&gt;I have a data table with column names having xy coordinates embedded in them. something like "delay [x,y]"&lt;/P&gt;
&lt;P&gt;I'd like to use a list of [x,y] (attached) to construct the column names so I can refer to a specific column in that table.&lt;/P&gt;
&lt;P&gt;When I tried to do subtractions referring to the column using dt:name() it errored out "Name arg must be quoted string". Any suggestions?&amp;nbsp;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;list=xy&amp;lt;&amp;lt; get column names(String)
col="delay"||Substr(char(list[{1}]), 3,Length( char(list[{1}]))-4);
a=dt:name(char(col))[15]-dt:name(char(col))[25]&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 09 Jun 2023 18:05:44 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Refer-to-Columns-in-other-Data-Table-using-Formula-in-Column/m-p/438221#M68687</guid>
      <dc:creator>midori555</dc:creator>
      <dc:date>2023-06-09T18:05:44Z</dc:date>
    </item>
    <item>
      <title>Re: Refer to Columns in other Data Table using Formula in Column Names</title>
      <link>https://community.jmp.com/t5/Discussions/Refer-to-Columns-in-other-Data-Table-using-Formula-in-Column/m-p/438259#M68689</link>
      <description>&lt;P&gt;Given the attached data table, the following JSL works.&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;dt=current data table();
list=dt&amp;lt;&amp;lt; get column names(String);
//col="delay"||Substr(char(list[1]), 3,Length( char(list[1]))-4);
col=list[1];
//a=dt:name(char(col))[15]-dt:name(char(col))[25]
a=column(dt,col)[15]-column(dt,col)[25];&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Fri, 19 Nov 2021 03:36:46 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Refer-to-Columns-in-other-Data-Table-using-Formula-in-Column/m-p/438259#M68689</guid>
      <dc:creator>txnelson</dc:creator>
      <dc:date>2021-11-19T03:36:46Z</dc:date>
    </item>
  </channel>
</rss>

