<?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 read table into list? in Discussions</title>
    <link>https://community.jmp.com/t5/Discussions/How-to-read-table-into-list/m-p/20602#M18735</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Jim, &lt;/P&gt;&lt;P&gt;Thanks a lot for the reply. It works just fine.&lt;/P&gt;&lt;P&gt;However, I found that my renaming code does not work if there are no columns with one of the names from name_in (and there will often be columns in table that do not have ALL names from NameChanging.jmp table).&lt;/P&gt;&lt;P&gt;So far I have this:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;for(i=1, i&amp;lt;=N Items(name_out), i++, &lt;/P&gt;&lt;P&gt; show(i); Try(col=Column(name_in&lt;I&gt;)&amp;lt;&amp;lt;Set Name(name_out&lt;I&gt;), Throw("NO COLUMN FOUND");&lt;/I&gt;&lt;/I&gt;&lt;/P&gt;&lt;P&gt; show(col)); show(i)&lt;/P&gt;&lt;P&gt;) &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But cycle breaks after fifrst iteration when it does not finds the first name from name_in in the table.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 26 Sep 2016 16:50:26 GMT</pubDate>
    <dc:creator>miguello</dc:creator>
    <dc:date>2016-09-26T16:50:26Z</dc:date>
    <item>
      <title>How to read table into list?</title>
      <link>https://community.jmp.com/t5/Discussions/How-to-read-table-into-list/m-p/20600#M18733</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Let's say I have a table "dt" where column names are meaningless.&lt;/P&gt;&lt;P&gt;And I have a table "dt_source" with two columns - one column meaningless name and the other has corresponding meaningful name.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I'm trying to write a script that would rename columns from meaningless to meaningful.&lt;/P&gt;&lt;P&gt;Columns might be different, so I'm going to create a master table "dt_source" with corresponding values.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Now I have a script ready that takes meaningless and leaningful names from a list withing the script and renames colums for each pair if such meaningless name exists.&lt;/P&gt;&lt;P&gt;I want to be able to take those corresponding pairs not from typed in list:&lt;/P&gt;&lt;P&gt;name_in={"col1", "col2"};&lt;/P&gt;&lt;P&gt;name_out={"Age", "Height")&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;but from a table.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;How do I read dt_name_source into two lists: name_in and name_out?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So far I have this:&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000000; font-family: Times New Roman; font-size: 12pt;"&gt;&amp;nbsp; &lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin: 0px 0px 10pt;"&gt;&lt;SPAN lang="EN" style="color: #0000dd; font-family: Consolas; font-size: 10pt;"&gt;Names Default To Here&lt;/SPAN&gt;&lt;STRONG&gt;&lt;SPAN lang="EN" style="color: black; font-family: Consolas; font-size: 10pt;"&gt;(&lt;/SPAN&gt;&lt;SPAN lang="EN" style="color: teal; font-family: Consolas; font-size: 10pt;"&gt;1&lt;/SPAN&gt;&lt;SPAN lang="EN" style="color: black; font-family: Consolas; font-size: 10pt;"&gt;)&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;SPAN lang="EN" style="color: navy; font-family: Consolas; font-size: 10pt;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000000; font-family: Times New Roman; font-size: 12pt;"&gt;&amp;nbsp; &lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin: 0px 0px 10pt;"&gt;&lt;SPAN lang="EN" style="color: #0000dd; font-family: Consolas; font-size: 10pt;"&gt;Try&lt;/SPAN&gt;&lt;STRONG&gt;&lt;SPAN lang="EN" style="color: black; font-family: Consolas; font-size: 10pt;"&gt;(&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;SPAN lang="EN" style="color: black; font-family: Consolas; font-size: 10pt;"&gt;dt_source &lt;/SPAN&gt;&lt;SPAN lang="EN" style="color: navy; font-family: Consolas; font-size: 10pt;"&gt;=&lt;/SPAN&gt; &lt;SPAN lang="EN" style="color: #0000dd; font-family: Consolas; font-size: 10pt;"&gt;Data Table&lt;/SPAN&gt;&lt;STRONG&gt;&lt;SPAN lang="EN" style="color: black; font-family: Consolas; font-size: 10pt;"&gt;(&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;SPAN lang="EN" style="color: purple; font-family: Consolas; font-size: 10pt;"&gt;"NameChanging.jmp"&lt;/SPAN&gt;&lt;STRONG&gt;&lt;SPAN lang="EN" style="color: black; font-family: Consolas; font-size: 10pt;"&gt;)&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;SPAN lang="EN" style="color: navy; font-family: Consolas; font-size: 10pt;"&gt;,&lt;/SPAN&gt; &lt;SPAN lang="EN" style="color: #0000dd; font-family: Consolas; font-size: 10pt;"&gt;Throw&lt;/SPAN&gt;&lt;STRONG&gt;&lt;SPAN lang="EN" style="color: black; font-family: Consolas; font-size: 10pt;"&gt;(&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;SPAN lang="EN" style="color: purple; font-family: Consolas; font-size: 10pt;"&gt;"Trying to open data table"&lt;/SPAN&gt;&lt;STRONG&gt;&lt;SPAN lang="EN" style="color: black; font-family: Consolas; font-size: 10pt;"&gt;))&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;SPAN lang="EN" style="color: navy; font-family: Consolas; font-size: 10pt;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000000; font-family: Times New Roman; font-size: 12pt;"&gt;&amp;nbsp; &lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin: 0px 0px 10pt;"&gt;&lt;SPAN lang="EN" style="color: #0000dd; font-family: Consolas; font-size: 10pt;"&gt;If&lt;/SPAN&gt;&lt;STRONG&gt;&lt;SPAN lang="EN" style="color: black; font-family: Consolas; font-size: 10pt;"&gt;(&lt;/SPAN&gt;&lt;/STRONG&gt; &lt;SPAN lang="EN" style="color: #0000dd; font-family: Consolas; font-size: 10pt;"&gt;Not&lt;/SPAN&gt;&lt;STRONG&gt;&lt;SPAN lang="EN" style="color: black; font-family: Consolas; font-size: 10pt;"&gt;(&lt;/SPAN&gt;&lt;/STRONG&gt; &lt;SPAN lang="EN" style="color: #0000dd; font-family: Consolas; font-size: 10pt;"&gt;Is Scriptable&lt;/SPAN&gt;&lt;STRONG&gt;&lt;SPAN lang="EN" style="color: black; font-family: Consolas; font-size: 10pt;"&gt;(&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;SPAN lang="EN" style="color: black; font-family: Consolas; font-size: 10pt;"&gt; dt_source &lt;STRONG&gt;)&lt;/STRONG&gt; &lt;STRONG&gt;)&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN lang="EN" style="color: navy; font-family: Consolas; font-size: 10pt;"&gt;,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000000; font-family: Times New Roman; font-size: 12pt;"&gt;&amp;nbsp; &lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin: 0px 0px 10pt;"&gt;&lt;SPAN lang="EN" style="color: black; font-family: Consolas; font-size: 10pt;"&gt;dt_source &lt;/SPAN&gt;&lt;SPAN lang="EN" style="color: navy; font-family: Consolas; font-size: 10pt;"&gt;=&lt;/SPAN&gt; &lt;SPAN lang="EN" style="color: #0000dd; font-family: Consolas; font-size: 10pt;"&gt;Open&lt;/SPAN&gt;&lt;STRONG&gt;&lt;SPAN lang="EN" style="color: black; font-family: Consolas; font-size: 10pt;"&gt;(&lt;/SPAN&gt;&lt;/STRONG&gt; &lt;SPAN lang="EN" style="color: purple; font-family: Consolas; font-size: 10pt;"&gt;"NameChanging.jmp"&lt;/SPAN&gt;&lt;SPAN lang="EN" style="color: black; font-family: Consolas; font-size: 10pt;"&gt; &lt;STRONG&gt;)&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN lang="EN" style="color: navy; font-family: Consolas; font-size: 10pt;"&gt;,&lt;/SPAN&gt;&lt;SPAN lang="EN" style="color: black; font-family: Consolas; font-size: 10pt;"&gt; dt_source &lt;/SPAN&gt;&lt;SPAN lang="EN" style="color: navy; font-family: Consolas; font-size: 10pt;"&gt;=&lt;/SPAN&gt; &lt;SPAN lang="EN" style="color: #0000dd; font-family: Consolas; font-size: 10pt;"&gt;Data Table&lt;/SPAN&gt;&lt;STRONG&gt;&lt;SPAN lang="EN" style="color: black; font-family: Consolas; font-size: 10pt;"&gt;(&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;SPAN lang="EN" style="color: purple; font-family: Consolas; font-size: 10pt;"&gt;"NameChanging.jmp"&lt;/SPAN&gt;&lt;STRONG&gt;&lt;SPAN lang="EN" style="color: black; font-family: Consolas; font-size: 10pt;"&gt;)&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;SPAN lang="EN" style="color: navy; font-family: Consolas; font-size: 10pt;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000000; font-family: Times New Roman; font-size: 12pt;"&gt;&amp;nbsp; &lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin: 0px 0px 10pt;"&gt;&lt;STRONG&gt;&lt;SPAN lang="EN" style="color: black; font-family: Consolas; font-size: 10pt;"&gt;)&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;SPAN lang="EN" style="color: navy; font-family: Consolas; font-size: 10pt;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000000; font-family: Times New Roman; font-size: 12pt;"&gt;&amp;nbsp; &lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin: 0px 0px 10pt;"&gt;&lt;SPAN lang="EN" style="color: #0000dd; font-family: Consolas; font-size: 10pt;"&gt;Current Data Table&lt;/SPAN&gt;&lt;STRONG&gt;&lt;SPAN lang="EN" style="color: black; font-family: Consolas; font-size: 10pt;"&gt;(&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;SPAN lang="EN" style="color: black; font-family: Consolas; font-size: 10pt;"&gt;dt_source&lt;STRONG&gt;)&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN lang="EN" style="color: navy; font-family: Consolas; font-size: 10pt;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000000; font-family: Times New Roman; font-size: 12pt;"&gt;&amp;nbsp; &lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin: 0px 0px 10pt;"&gt;&lt;SPAN lang="EN" style="color: black; font-family: Consolas; font-size: 10pt;"&gt;name_in&lt;/SPAN&gt;&lt;SPAN lang="EN" style="color: navy; font-family: Consolas; font-size: 10pt;"&gt;=&lt;/SPAN&gt;&lt;SPAN lang="EN" style="color: #0000dd; font-family: Consolas; font-size: 10pt;"&gt;List&lt;/SPAN&gt;&lt;STRONG&gt;&lt;SPAN lang="EN" style="color: black; font-family: Consolas; font-size: 10pt;"&gt;()&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;SPAN lang="EN" style="color: navy; font-family: Consolas; font-size: 10pt;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000000; font-family: Times New Roman; font-size: 12pt;"&gt;&amp;nbsp; &lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin: 0px 0px 10pt;"&gt;&lt;SPAN lang="EN" style="color: black; font-family: Consolas; font-size: 10pt;"&gt;name_out&lt;/SPAN&gt;&lt;SPAN lang="EN" style="color: navy; font-family: Consolas; font-size: 10pt;"&gt;=&lt;/SPAN&gt;&lt;SPAN lang="EN" style="color: #0000dd; font-family: Consolas; font-size: 10pt;"&gt;List&lt;/SPAN&gt;&lt;STRONG&gt;&lt;SPAN lang="EN" style="color: black; font-family: Consolas; font-size: 10pt;"&gt;()&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;SPAN lang="EN" style="color: navy; font-family: Consolas; font-size: 10pt;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000000; font-family: Times New Roman; font-size: 12pt;"&gt;&amp;nbsp; &lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin: 0px 0px 10pt;"&gt;&lt;SPAN lang="EN" style="color: black; font-family: Consolas; font-size: 10pt;"&gt;col_name_in&lt;/SPAN&gt;&lt;SPAN lang="EN" style="color: navy; font-family: Consolas; font-size: 10pt;"&gt;=&lt;/SPAN&gt;&lt;SPAN lang="EN" style="color: #0000dd; font-family: Consolas; font-size: 10pt;"&gt;Column&lt;/SPAN&gt;&lt;STRONG&gt;&lt;SPAN lang="EN" style="color: black; font-family: Consolas; font-size: 10pt;"&gt;(&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;SPAN lang="EN" style="color: purple; font-family: Consolas; font-size: 10pt;"&gt;"name_in"&lt;/SPAN&gt;&lt;STRONG&gt;&lt;SPAN lang="EN" style="color: black; font-family: Consolas; font-size: 10pt;"&gt;)&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;SPAN lang="EN" style="color: navy; font-family: Consolas; font-size: 10pt;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000000; font-family: Times New Roman; font-size: 12pt;"&gt;&amp;nbsp; &lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin: 0px 0px 10pt;"&gt;&lt;SPAN lang="EN" style="color: black; font-family: Consolas; font-size: 10pt;"&gt;col_name_out&lt;/SPAN&gt;&lt;SPAN lang="EN" style="color: navy; font-family: Consolas; font-size: 10pt;"&gt;=&lt;/SPAN&gt;&lt;SPAN lang="EN" style="color: #0000dd; font-family: Consolas; font-size: 10pt;"&gt;Column&lt;/SPAN&gt;&lt;STRONG&gt;&lt;SPAN lang="EN" style="color: black; font-family: Consolas; font-size: 10pt;"&gt;(&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;SPAN lang="EN" style="color: purple; font-family: Consolas; font-size: 10pt;"&gt;"name_out"&lt;/SPAN&gt;&lt;STRONG&gt;&lt;SPAN lang="EN" style="color: black; font-family: Consolas; font-size: 10pt;"&gt;)&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;SPAN lang="EN" style="color: navy; font-family: Consolas; font-size: 10pt;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000000; font-family: Times New Roman; font-size: 12pt;"&gt;&amp;nbsp; &lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin: 0px 0px 10pt;"&gt;&lt;SPAN lang="EN" style="color: black; font-family: Consolas; font-size: 10pt;"&gt;i&lt;/SPAN&gt;&lt;SPAN lang="EN" style="color: navy; font-family: Consolas; font-size: 10pt;"&gt;=&lt;/SPAN&gt;&lt;STRONG&gt;&lt;SPAN lang="EN" style="color: teal; font-family: Consolas; font-size: 10pt;"&gt;0&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;SPAN lang="EN" style="color: navy; font-family: Consolas; font-size: 10pt;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000000; font-family: Times New Roman; font-size: 12pt;"&gt;&amp;nbsp; &lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin: 0px 0px 10pt;"&gt;&lt;SPAN lang="EN" style="color: #0000dd; font-family: Consolas; font-size: 10pt;"&gt;For Each Row&lt;/SPAN&gt;&lt;STRONG&gt;&lt;SPAN lang="EN" style="color: black; font-family: Consolas; font-size: 10pt;"&gt;(&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;SPAN lang="EN" style="color: black; font-family: Consolas; font-size: 10pt;"&gt;name_in&lt;STRONG&gt;[&lt;/STRONG&gt;i&lt;STRONG&gt;]&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN lang="EN" style="color: navy; font-family: Consolas; font-size: 10pt;"&gt;=&lt;/SPAN&gt;&lt;SPAN lang="EN" style="color: black; font-family: Consolas; font-size: 10pt;"&gt;col_name_in&lt;STRONG&gt;[]&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN lang="EN" style="color: navy; font-family: Consolas; font-size: 10pt;"&gt;;&lt;/SPAN&gt;&lt;SPAN lang="EN" style="color: black; font-family: Consolas; font-size: 10pt;"&gt; name_out&lt;STRONG&gt;[&lt;/STRONG&gt;i&lt;STRONG&gt;]&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN lang="EN" style="color: navy; font-family: Consolas; font-size: 10pt;"&gt;=&lt;/SPAN&gt;&lt;SPAN lang="EN" style="color: black; font-family: Consolas; font-size: 10pt;"&gt;col_name_out&lt;STRONG&gt;[]&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN lang="EN" style="color: navy; font-family: Consolas; font-size: 10pt;"&gt;;&lt;/SPAN&gt;&lt;SPAN lang="EN" style="color: black; font-family: Consolas; font-size: 10pt;"&gt; i&lt;/SPAN&gt;&lt;SPAN lang="EN" style="color: navy; font-family: Consolas; font-size: 10pt;"&gt;++&lt;/SPAN&gt;&lt;STRONG&gt;&lt;SPAN lang="EN" style="color: black; font-family: Consolas; font-size: 10pt;"&gt;)&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;SPAN lang="EN" style="color: navy; font-family: Consolas; font-size: 10pt;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000000; font-family: Times New Roman; font-size: 12pt;"&gt;&amp;nbsp; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But then it doesn't like it:&lt;/P&gt;&lt;P&gt;Subscript problem{1} in access or evaluation of 'Assign' , name_in&lt;I&gt; =&amp;nbsp; /*###*/col_name_in[] /*###*/&lt;/I&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If I try just a variable&lt;/P&gt;&lt;P&gt;&lt;SPAN lang="EN" style="color: #0000dd; font-family: Consolas; font-size: 10pt;"&gt;For Each Row&lt;/SPAN&gt;&lt;STRONG&gt;&lt;SPAN lang="EN" style="color: black; font-family: Consolas; font-size: 10pt;"&gt;(&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;SPAN lang="EN" style="color: black; font-family: Consolas; font-size: 10pt;"&gt;name_in&lt;/SPAN&gt;&lt;SPAN lang="EN" style="color: navy; font-family: Consolas; font-size: 10pt;"&gt;=&lt;/SPAN&gt;&lt;SPAN lang="EN" style="color: black; font-family: Consolas; font-size: 10pt;"&gt;col_name_in&lt;STRONG&gt;[]&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN lang="EN" style="color: navy; font-family: Consolas; font-size: 10pt;"&gt;;&lt;/SPAN&gt;&lt;SPAN lang="EN" style="color: black; font-family: Consolas; font-size: 10pt;"&gt; name_out&lt;/SPAN&gt;&lt;SPAN lang="EN" style="color: navy; font-family: Consolas; font-size: 10pt;"&gt;=&lt;/SPAN&gt;&lt;SPAN lang="EN" style="color: black; font-family: Consolas; font-size: 10pt;"&gt;col_name_out&lt;STRONG&gt;[]&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;STRONG&gt;&lt;SPAN lang="EN" style="color: black; font-family: Consolas; font-size: 10pt;"&gt;)&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;SPAN lang="EN" style="color: navy; font-family: Consolas; font-size: 10pt;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN lang="EN" style="color: navy; font-family: Consolas; font-size: 10pt;"&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN lang="EN" style="color: navy; font-family: Consolas; font-size: 10pt;"&gt;Then it's OK, but it's just one variable taking different values as the cycle goes.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN lang="EN" style="color: navy; font-family: Consolas; font-size: 10pt;"&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN lang="EN" style="color: navy; font-family: Consolas; font-size: 10pt;"&gt;And I need a list.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN lang="EN" style="color: navy; font-family: Consolas; font-size: 10pt;"&gt;Can somebody give an idea how to handle this?&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN lang="EN" style="color: navy; font-family: Consolas; font-size: 10pt;"&gt;Thanks!&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN lang="EN" style="color: navy; font-family: Consolas; font-size: 10pt;"&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;PRE __default_attr="plain" __jive_macro_name="code" class="jive_macro_code _jivemacro_uid_14746797735457042 jive_text_macro" jivemacro_uid="_14746797735457042"&gt;&lt;P&gt;&lt;/P&gt;&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 24 Sep 2016 01:20:19 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/How-to-read-table-into-list/m-p/20600#M18733</guid>
      <dc:creator>miguello</dc:creator>
      <dc:date>2016-09-24T01:20:19Z</dc:date>
    </item>
    <item>
      <title>Re: How to read table into list?</title>
      <link>https://community.jmp.com/t5/Discussions/How-to-read-table-into-list/m-p/20601#M18734</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I believe the following script will get the values into the lists you need:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;STRONG&gt;&lt;SPAN style="font-size: 10.0pt; font-family: Consolas; color: #0000dd;"&gt;Names Default To Here&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; font-family: Consolas; color: black;"&gt;( &lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; font-family: Consolas; color: teal;"&gt;1&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; font-family: Consolas; color: black;"&gt; )&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; font-family: Consolas; color: navy;"&gt;;&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;STRONG&gt; &lt;/STRONG&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;STRONG&gt;&lt;SPAN style="font-size: 10.0pt; font-family: Consolas; color: #0000dd;"&gt;If&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; font-family: Consolas; color: black;"&gt;( &lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; font-family: Consolas; color: #0000dd;"&gt;Try&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; font-family: Consolas; color: black;"&gt;( dt_source &lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; font-family: Consolas; color: navy;"&gt;&amp;lt;&amp;lt;&lt;/SPAN&gt; &lt;SPAN style="font-size: 10.0pt; font-family: Consolas; color: navy;"&gt;get name,&lt;/SPAN&gt; &lt;SPAN style="font-size: 10.0pt; font-family: Consolas; color: purple;"&gt;""&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; font-family: Consolas; color: black;"&gt; ) &lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; font-family: Consolas; color: navy;"&gt;!=&lt;/SPAN&gt; &lt;SPAN style="font-size: 10.0pt; font-family: Consolas; color: purple;"&gt;"NameChanging"&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; font-family: Consolas; color: navy;"&gt;,&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;STRONG&gt;&lt;SPAN style="font-size: 10.0pt; font-family: Consolas; color: black;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; dt_source &lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; font-family: Consolas; color: navy;"&gt;=&lt;/SPAN&gt; &lt;SPAN style="font-size: 10.0pt; font-family: Consolas; color: #0000dd;"&gt;Open&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; font-family: Consolas; color: black;"&gt;( &lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; font-family: Consolas; color: purple;"&gt;"NameChanging.jmp"&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; font-family: Consolas; color: black;"&gt; )&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;STRONG&gt;&lt;SPAN style="font-size: 10.0pt; font-family: Consolas; color: black;"&gt;)&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; font-family: Consolas; color: navy;"&gt;;&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;STRONG&gt; &lt;/STRONG&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;STRONG&gt;&lt;SPAN style="font-size: 10.0pt; font-family: Consolas; color: black;"&gt;name_in &lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; font-family: Consolas; color: navy;"&gt;=&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; font-family: Consolas; color: black;"&gt; dt_source&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; font-family: Consolas; color: navy;"&gt;:&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; font-family: Consolas; color: black;"&gt;name_in &lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; font-family: Consolas; color: navy;"&gt;&amp;lt;&amp;lt;&lt;/SPAN&gt; &lt;SPAN style="font-size: 10.0pt; font-family: Consolas; color: navy;"&gt;get values;&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;SPAN style="font-size: 10.0pt; font-family: Consolas; color: black;"&gt;name_out &lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; font-family: Consolas; color: navy;"&gt;=&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; font-family: Consolas; color: black;"&gt; dt_source&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; font-family: Consolas; color: navy;"&gt;:&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; font-family: Consolas; color: black;"&gt;name_out &lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; font-family: Consolas; color: navy;"&gt;&amp;lt;&amp;lt;&lt;/SPAN&gt; &lt;SPAN style="font-size: 10.0pt; font-family: Consolas; color: navy;"&gt;get values;&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 24 Sep 2016 15:40:27 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/How-to-read-table-into-list/m-p/20601#M18734</guid>
      <dc:creator>txnelson</dc:creator>
      <dc:date>2016-09-24T15:40:27Z</dc:date>
    </item>
    <item>
      <title>Re: How to read table into list?</title>
      <link>https://community.jmp.com/t5/Discussions/How-to-read-table-into-list/m-p/20602#M18735</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Jim, &lt;/P&gt;&lt;P&gt;Thanks a lot for the reply. It works just fine.&lt;/P&gt;&lt;P&gt;However, I found that my renaming code does not work if there are no columns with one of the names from name_in (and there will often be columns in table that do not have ALL names from NameChanging.jmp table).&lt;/P&gt;&lt;P&gt;So far I have this:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;for(i=1, i&amp;lt;=N Items(name_out), i++, &lt;/P&gt;&lt;P&gt; show(i); Try(col=Column(name_in&lt;I&gt;)&amp;lt;&amp;lt;Set Name(name_out&lt;I&gt;), Throw("NO COLUMN FOUND");&lt;/I&gt;&lt;/I&gt;&lt;/P&gt;&lt;P&gt; show(col)); show(i)&lt;/P&gt;&lt;P&gt;) &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But cycle breaks after fifrst iteration when it does not finds the first name from name_in in the table.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 26 Sep 2016 16:50:26 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/How-to-read-table-into-list/m-p/20602#M18735</guid>
      <dc:creator>miguello</dc:creator>
      <dc:date>2016-09-26T16:50:26Z</dc:date>
    </item>
    <item>
      <title>Re: How to read table into list?</title>
      <link>https://community.jmp.com/t5/Discussions/How-to-read-table-into-list/m-p/20603#M18736</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Jim,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This seems to work fine for now. Let me know if this is a correct way of doing things:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;for(i=1, i&amp;lt;=N Items(name_out), i++, &lt;/P&gt;&lt;P&gt; show(i); If( !Is Missing( Is Scriptable( Try( Column( name_in&lt;I&gt; ) ) ) ), col=Column(name_in&lt;I&gt;)&amp;lt;&amp;lt;Set Name(name_out&lt;I&gt;);&lt;/I&gt;&lt;/I&gt;&lt;/I&gt;&lt;/P&gt;&lt;P&gt; show(col); show(i))&lt;/P&gt;&lt;P&gt;) ;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 26 Sep 2016 17:10:48 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/How-to-read-table-into-list/m-p/20603#M18736</guid>
      <dc:creator>miguello</dc:creator>
      <dc:date>2016-09-26T17:10:48Z</dc:date>
    </item>
    <item>
      <title>Re: How to read table into list?</title>
      <link>https://community.jmp.com/t5/Discussions/How-to-read-table-into-list/m-p/20604#M18737</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I would probably do things a little differently:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Names Default to Here( 1 );&lt;/P&gt;&lt;P&gt;// Pointer to the data table to be changed&lt;/P&gt;&lt;P&gt;dt = data table("The name of the table to be changed");&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #555555; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;for(i=1, i&amp;lt;=N Items(name_out), i++,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #555555; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; If(try(column(dt, name_in&lt;I&gt;) &amp;lt;&amp;lt; get name, "") != "", column( dt, name_in&lt;I&gt;) &amp;lt;&amp;lt; Set Name(name_out&lt;I&gt;));&lt;/I&gt;&lt;/I&gt;&lt;/I&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #555555; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;);&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 26 Sep 2016 17:49:25 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/How-to-read-table-into-list/m-p/20604#M18737</guid>
      <dc:creator>txnelson</dc:creator>
      <dc:date>2016-09-26T17:49:25Z</dc:date>
    </item>
  </channel>
</rss>

