<?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 Assign table reference to selected item from list box in Discussions</title>
    <link>https://community.jmp.com/t5/Discussions/Assign-table-reference-to-selected-item-from-list-box/m-p/43654#M25254</link>
    <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am attempting to script a dialog window that prompts the user to select 2 data tables from a pair of list boxes that display all currently open table names.&amp;nbsp; The dialog window, list box, and selection process all work as intended however once I have the 2 selected table names as variables I hit a road block when trying to associate them to data table references.&amp;nbsp; The data table references are needed to perform work on the selected tables later in the code.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Issues arrise at the last two lines with the following error for dt1.&lt;/P&gt;&lt;P&gt;Argument must contain data table reference in access or evaluation of 'Current Data Table' , Current Data Table/*###*/(SourceData)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I realize that SourceData and TargetData are list objects with only 1 item each so I tried converting to string before associating as a data table name but that didn't work.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Any help is greatly appreciated. Please refer to script section below.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;FONT face="Consolas" size="2"&gt;openTables &lt;/FONT&gt;&lt;FONT color="#000080" face="Consolas" size="2"&gt;=&lt;/FONT&gt;&lt;FONT face="Consolas" size="2"&gt; &lt;STRONG&gt;{}&lt;/STRONG&gt;&lt;/FONT&gt;&lt;FONT color="#000080" face="Consolas" size="2"&gt;;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#0000dd" face="Consolas" size="2"&gt;For&lt;/FONT&gt;&lt;FONT face="Consolas" size="2"&gt; &lt;STRONG&gt;(&lt;/STRONG&gt;t&lt;/FONT&gt;&lt;FONT color="#000080" face="Consolas" size="2"&gt;=&lt;/FONT&gt;&lt;STRONG&gt;&lt;FONT color="#008080" face="Consolas" size="2"&gt;1&lt;/FONT&gt;&lt;/STRONG&gt;&lt;FONT color="#000080" face="Consolas" size="2"&gt;,&lt;/FONT&gt;&lt;FONT face="Consolas" size="2"&gt; t&lt;/FONT&gt;&lt;FONT color="#000080" face="Consolas" size="2"&gt;&amp;lt;=&lt;/FONT&gt;&lt;FONT color="#0000dd" face="Consolas" size="2"&gt;NTable&lt;/FONT&gt;&lt;STRONG&gt;&lt;FONT face="Consolas" size="2"&gt;()&lt;/FONT&gt;&lt;/STRONG&gt;&lt;FONT color="#000080" face="Consolas" size="2"&gt;,&lt;/FONT&gt;&lt;FONT face="Consolas" size="2"&gt; t&lt;/FONT&gt;&lt;FONT color="#000080" face="Consolas" size="2"&gt;++,&lt;/FONT&gt; &lt;FONT color="#0000dd" face="Consolas" size="2"&gt;InsertInto&lt;/FONT&gt;&lt;STRONG&gt;&lt;FONT face="Consolas" size="2"&gt;(&lt;/FONT&gt;&lt;/STRONG&gt;&lt;FONT face="Consolas" size="2"&gt;openTables&lt;/FONT&gt;&lt;FONT color="#000080" face="Consolas" size="2"&gt;,&lt;/FONT&gt; &lt;FONT color="#0000dd" face="Consolas" size="2"&gt;DataTable&lt;/FONT&gt;&lt;STRONG&gt;&lt;FONT face="Consolas" size="2"&gt;(&lt;/FONT&gt;&lt;/STRONG&gt;&lt;FONT face="Consolas" size="2"&gt;t&lt;STRONG&gt;)&lt;/STRONG&gt; &lt;/FONT&gt;&lt;FONT color="#000080" face="Consolas" size="2"&gt;&amp;lt;&amp;lt;&lt;/FONT&gt; &lt;STRONG&gt;&lt;FONT color="#000080" face="Consolas" size="2"&gt;GetName&lt;/FONT&gt;&lt;FONT face="Consolas" size="2"&gt;))&lt;/FONT&gt;&lt;/STRONG&gt;&lt;FONT color="#000080" face="Consolas" size="2"&gt;;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="Consolas" size="2"&gt;SelectDataWindow &lt;/FONT&gt;&lt;FONT color="#000080" face="Consolas" size="2"&gt;=&lt;/FONT&gt; &lt;FONT color="#0000dd" face="Consolas" size="2"&gt;New Window&lt;/FONT&gt;&lt;STRONG&gt;&lt;FONT face="Consolas" size="2"&gt;(&lt;/FONT&gt;&lt;/STRONG&gt; &lt;FONT color="#800080" face="Consolas" size="2"&gt;"Select data tables"&lt;/FONT&gt;&lt;FONT color="#000080" face="Consolas" size="2"&gt;,&lt;/FONT&gt; &lt;FONT color="#000080" face="Consolas" size="2"&gt;&amp;lt;&amp;lt;&lt;STRONG&gt;Modal&lt;/STRONG&gt;,&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="Consolas" size="2"&gt;SourcePanel &lt;/FONT&gt;&lt;FONT color="#000080" face="Consolas" size="2"&gt;=&lt;/FONT&gt; &lt;FONT color="#0000dd" face="Consolas" size="2"&gt;Panel Box&lt;/FONT&gt;&lt;STRONG&gt;&lt;FONT face="Consolas" size="2"&gt;(&lt;/FONT&gt;&lt;/STRONG&gt;&lt;FONT color="#800080" face="Consolas" size="2"&gt;"Source Data Table"&lt;/FONT&gt;&lt;FONT color="#000080" face="Consolas" size="2"&gt;,&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="Consolas" size="2"&gt;SourceListBox &lt;/FONT&gt;&lt;FONT color="#000080" face="Consolas" size="2"&gt;=&lt;/FONT&gt; &lt;FONT color="#0000dd" face="Consolas" size="2"&gt;List Box&lt;/FONT&gt;&lt;STRONG&gt;&lt;FONT face="Consolas" size="2"&gt;(&lt;/FONT&gt;&lt;/STRONG&gt;&lt;FONT face="Consolas" size="2"&gt;openTables&lt;/FONT&gt;&lt;FONT color="#000080" face="Consolas" size="2"&gt;,&lt;/FONT&gt;&lt;FONT face="Consolas" size="2"&gt; Max Selected&lt;STRONG&gt;(&lt;/STRONG&gt;&lt;/FONT&gt;&lt;STRONG&gt;&lt;FONT color="#008080" face="Consolas" size="2"&gt;1&lt;/FONT&gt;&lt;FONT face="Consolas" size="2"&gt;)))&lt;/FONT&gt;&lt;/STRONG&gt;&lt;FONT color="#000080" face="Consolas" size="2"&gt;,&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="Consolas" size="2"&gt;TargetPanel &lt;/FONT&gt;&lt;FONT color="#000080" face="Consolas" size="2"&gt;=&lt;/FONT&gt; &lt;FONT color="#0000dd" face="Consolas" size="2"&gt;Panel Box&lt;/FONT&gt;&lt;STRONG&gt;&lt;FONT face="Consolas" size="2"&gt;(&lt;/FONT&gt;&lt;/STRONG&gt;&lt;FONT color="#800080" face="Consolas" size="2"&gt;"Target Data Table"&lt;/FONT&gt;&lt;FONT color="#000080" face="Consolas" size="2"&gt;,&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="Consolas" size="2"&gt;TargetListBox &lt;/FONT&gt;&lt;FONT color="#000080" face="Consolas" size="2"&gt;=&lt;/FONT&gt; &lt;FONT color="#0000dd" face="Consolas" size="2"&gt;List Box&lt;/FONT&gt;&lt;STRONG&gt;&lt;FONT face="Consolas" size="2"&gt;(&lt;/FONT&gt;&lt;/STRONG&gt;&lt;FONT face="Consolas" size="2"&gt;openTables&lt;/FONT&gt;&lt;FONT color="#000080" face="Consolas" size="2"&gt;,&lt;/FONT&gt;&lt;FONT face="Consolas" size="2"&gt; Max Selected&lt;STRONG&gt;(&lt;/STRONG&gt;&lt;/FONT&gt;&lt;STRONG&gt;&lt;FONT color="#008080" face="Consolas" size="2"&gt;1&lt;/FONT&gt;&lt;FONT face="Consolas" size="2"&gt;)))&lt;/FONT&gt;&lt;/STRONG&gt;&lt;FONT color="#000080" face="Consolas" size="2"&gt;,&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#0000dd" face="Consolas" size="2"&gt;Line Up Box&lt;/FONT&gt;&lt;STRONG&gt;&lt;FONT face="Consolas" size="2"&gt;(&lt;/FONT&gt;&lt;/STRONG&gt;&lt;FONT color="#0000dd" face="Consolas" size="2"&gt;NCol&lt;/FONT&gt;&lt;STRONG&gt;&lt;FONT face="Consolas" size="2"&gt;(&lt;/FONT&gt;&lt;FONT color="#008080" face="Consolas" size="2"&gt;2&lt;/FONT&gt;&lt;FONT face="Consolas" size="2"&gt;)&lt;/FONT&gt;&lt;/STRONG&gt;&lt;FONT color="#000080" face="Consolas" size="2"&gt;,&lt;/FONT&gt; &lt;FONT color="#0000dd" face="Consolas" size="2"&gt;Button Box&lt;/FONT&gt;&lt;STRONG&gt;&lt;FONT face="Consolas" size="2"&gt;(&lt;/FONT&gt;&lt;/STRONG&gt;&lt;FONT color="#800080" face="Consolas" size="2"&gt;"Ok"&lt;/FONT&gt;&lt;FONT color="#000080" face="Consolas" size="2"&gt;,&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="Consolas" size="2"&gt;SourceData &lt;/FONT&gt;&lt;FONT color="#000080" face="Consolas" size="2"&gt;=&lt;/FONT&gt;&lt;FONT face="Consolas" size="2"&gt; SourceListBox &lt;/FONT&gt;&lt;FONT color="#000080" face="Consolas" size="2"&gt;&amp;lt;&amp;lt;&lt;/FONT&gt; &lt;STRONG&gt;&lt;FONT color="#000080" face="Consolas" size="2"&gt;GetSelected&lt;/FONT&gt;&lt;/STRONG&gt;&lt;FONT color="#000080" face="Consolas" size="2"&gt;;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="Consolas" size="2"&gt;TargetData &lt;/FONT&gt;&lt;FONT color="#000080" face="Consolas" size="2"&gt;=&lt;/FONT&gt;&lt;FONT face="Consolas" size="2"&gt; TargetListBox &lt;/FONT&gt;&lt;FONT color="#000080" face="Consolas" size="2"&gt;&amp;lt;&amp;lt;&lt;/FONT&gt; &lt;STRONG&gt;&lt;FONT color="#000080" face="Consolas" size="2"&gt;GetSelected&lt;/FONT&gt;&lt;FONT face="Consolas" size="2"&gt;)&lt;/FONT&gt;&lt;/STRONG&gt;&lt;FONT color="#000080" face="Consolas" size="2"&gt;,&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#0000dd" face="Consolas" size="2"&gt;Button Box&lt;/FONT&gt;&lt;STRONG&gt;&lt;FONT face="Consolas" size="2"&gt;(&lt;/FONT&gt;&lt;/STRONG&gt;&lt;FONT color="#800080" face="Consolas" size="2"&gt;"Cancel"&lt;/FONT&gt;&lt;FONT color="#000080" face="Consolas" size="2"&gt;,&lt;/FONT&gt; &lt;FONT color="#0000dd" face="Consolas" size="2"&gt;Stop&lt;/FONT&gt;&lt;STRONG&gt;&lt;FONT face="Consolas" size="2"&gt;()&lt;/FONT&gt;&lt;/STRONG&gt;&lt;STRONG&gt;&lt;FONT face="Consolas" size="2"&gt;))&lt;/FONT&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="Consolas" size="2"&gt;&lt;STRONG&gt;)&lt;/STRONG&gt;&lt;/FONT&gt;&lt;FONT color="#000080" face="Consolas" size="2"&gt;;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="Consolas" size="2"&gt;dt1 &lt;/FONT&gt;&lt;FONT color="#000080" face="Consolas" size="2"&gt;=&lt;/FONT&gt; &lt;FONT color="#0000dd" face="Consolas" size="2"&gt;CurrentDataTable&lt;/FONT&gt;&lt;STRONG&gt;&lt;FONT face="Consolas" size="2"&gt;(&lt;/FONT&gt;&lt;/STRONG&gt;&lt;FONT face="Consolas" size="2"&gt;SourceData&lt;STRONG&gt;)&lt;/STRONG&gt;&lt;/FONT&gt;&lt;FONT color="#000080" face="Consolas" size="2"&gt;;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="Consolas" size="2"&gt;dt2 &lt;/FONT&gt;&lt;FONT color="#000080" face="Consolas" size="2"&gt;=&lt;/FONT&gt; &lt;FONT color="#0000dd" face="Consolas" size="2"&gt;CurrentDataTable&lt;/FONT&gt;&lt;STRONG&gt;&lt;FONT face="Consolas" size="2"&gt;(&lt;/FONT&gt;&lt;/STRONG&gt;&lt;FONT face="Consolas" size="2"&gt;TargetData&lt;STRONG&gt;)&lt;/STRONG&gt;&lt;/FONT&gt;&lt;FONT color="#000080" face="Consolas" size="2"&gt;;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Fri, 25 Aug 2017 23:59:01 GMT</pubDate>
    <dc:creator>RyMcQeN</dc:creator>
    <dc:date>2017-08-25T23:59:01Z</dc:date>
    <item>
      <title>Assign table reference to selected item from list box</title>
      <link>https://community.jmp.com/t5/Discussions/Assign-table-reference-to-selected-item-from-list-box/m-p/43654#M25254</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am attempting to script a dialog window that prompts the user to select 2 data tables from a pair of list boxes that display all currently open table names.&amp;nbsp; The dialog window, list box, and selection process all work as intended however once I have the 2 selected table names as variables I hit a road block when trying to associate them to data table references.&amp;nbsp; The data table references are needed to perform work on the selected tables later in the code.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Issues arrise at the last two lines with the following error for dt1.&lt;/P&gt;&lt;P&gt;Argument must contain data table reference in access or evaluation of 'Current Data Table' , Current Data Table/*###*/(SourceData)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I realize that SourceData and TargetData are list objects with only 1 item each so I tried converting to string before associating as a data table name but that didn't work.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Any help is greatly appreciated. Please refer to script section below.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;FONT face="Consolas" size="2"&gt;openTables &lt;/FONT&gt;&lt;FONT color="#000080" face="Consolas" size="2"&gt;=&lt;/FONT&gt;&lt;FONT face="Consolas" size="2"&gt; &lt;STRONG&gt;{}&lt;/STRONG&gt;&lt;/FONT&gt;&lt;FONT color="#000080" face="Consolas" size="2"&gt;;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#0000dd" face="Consolas" size="2"&gt;For&lt;/FONT&gt;&lt;FONT face="Consolas" size="2"&gt; &lt;STRONG&gt;(&lt;/STRONG&gt;t&lt;/FONT&gt;&lt;FONT color="#000080" face="Consolas" size="2"&gt;=&lt;/FONT&gt;&lt;STRONG&gt;&lt;FONT color="#008080" face="Consolas" size="2"&gt;1&lt;/FONT&gt;&lt;/STRONG&gt;&lt;FONT color="#000080" face="Consolas" size="2"&gt;,&lt;/FONT&gt;&lt;FONT face="Consolas" size="2"&gt; t&lt;/FONT&gt;&lt;FONT color="#000080" face="Consolas" size="2"&gt;&amp;lt;=&lt;/FONT&gt;&lt;FONT color="#0000dd" face="Consolas" size="2"&gt;NTable&lt;/FONT&gt;&lt;STRONG&gt;&lt;FONT face="Consolas" size="2"&gt;()&lt;/FONT&gt;&lt;/STRONG&gt;&lt;FONT color="#000080" face="Consolas" size="2"&gt;,&lt;/FONT&gt;&lt;FONT face="Consolas" size="2"&gt; t&lt;/FONT&gt;&lt;FONT color="#000080" face="Consolas" size="2"&gt;++,&lt;/FONT&gt; &lt;FONT color="#0000dd" face="Consolas" size="2"&gt;InsertInto&lt;/FONT&gt;&lt;STRONG&gt;&lt;FONT face="Consolas" size="2"&gt;(&lt;/FONT&gt;&lt;/STRONG&gt;&lt;FONT face="Consolas" size="2"&gt;openTables&lt;/FONT&gt;&lt;FONT color="#000080" face="Consolas" size="2"&gt;,&lt;/FONT&gt; &lt;FONT color="#0000dd" face="Consolas" size="2"&gt;DataTable&lt;/FONT&gt;&lt;STRONG&gt;&lt;FONT face="Consolas" size="2"&gt;(&lt;/FONT&gt;&lt;/STRONG&gt;&lt;FONT face="Consolas" size="2"&gt;t&lt;STRONG&gt;)&lt;/STRONG&gt; &lt;/FONT&gt;&lt;FONT color="#000080" face="Consolas" size="2"&gt;&amp;lt;&amp;lt;&lt;/FONT&gt; &lt;STRONG&gt;&lt;FONT color="#000080" face="Consolas" size="2"&gt;GetName&lt;/FONT&gt;&lt;FONT face="Consolas" size="2"&gt;))&lt;/FONT&gt;&lt;/STRONG&gt;&lt;FONT color="#000080" face="Consolas" size="2"&gt;;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="Consolas" size="2"&gt;SelectDataWindow &lt;/FONT&gt;&lt;FONT color="#000080" face="Consolas" size="2"&gt;=&lt;/FONT&gt; &lt;FONT color="#0000dd" face="Consolas" size="2"&gt;New Window&lt;/FONT&gt;&lt;STRONG&gt;&lt;FONT face="Consolas" size="2"&gt;(&lt;/FONT&gt;&lt;/STRONG&gt; &lt;FONT color="#800080" face="Consolas" size="2"&gt;"Select data tables"&lt;/FONT&gt;&lt;FONT color="#000080" face="Consolas" size="2"&gt;,&lt;/FONT&gt; &lt;FONT color="#000080" face="Consolas" size="2"&gt;&amp;lt;&amp;lt;&lt;STRONG&gt;Modal&lt;/STRONG&gt;,&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="Consolas" size="2"&gt;SourcePanel &lt;/FONT&gt;&lt;FONT color="#000080" face="Consolas" size="2"&gt;=&lt;/FONT&gt; &lt;FONT color="#0000dd" face="Consolas" size="2"&gt;Panel Box&lt;/FONT&gt;&lt;STRONG&gt;&lt;FONT face="Consolas" size="2"&gt;(&lt;/FONT&gt;&lt;/STRONG&gt;&lt;FONT color="#800080" face="Consolas" size="2"&gt;"Source Data Table"&lt;/FONT&gt;&lt;FONT color="#000080" face="Consolas" size="2"&gt;,&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="Consolas" size="2"&gt;SourceListBox &lt;/FONT&gt;&lt;FONT color="#000080" face="Consolas" size="2"&gt;=&lt;/FONT&gt; &lt;FONT color="#0000dd" face="Consolas" size="2"&gt;List Box&lt;/FONT&gt;&lt;STRONG&gt;&lt;FONT face="Consolas" size="2"&gt;(&lt;/FONT&gt;&lt;/STRONG&gt;&lt;FONT face="Consolas" size="2"&gt;openTables&lt;/FONT&gt;&lt;FONT color="#000080" face="Consolas" size="2"&gt;,&lt;/FONT&gt;&lt;FONT face="Consolas" size="2"&gt; Max Selected&lt;STRONG&gt;(&lt;/STRONG&gt;&lt;/FONT&gt;&lt;STRONG&gt;&lt;FONT color="#008080" face="Consolas" size="2"&gt;1&lt;/FONT&gt;&lt;FONT face="Consolas" size="2"&gt;)))&lt;/FONT&gt;&lt;/STRONG&gt;&lt;FONT color="#000080" face="Consolas" size="2"&gt;,&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="Consolas" size="2"&gt;TargetPanel &lt;/FONT&gt;&lt;FONT color="#000080" face="Consolas" size="2"&gt;=&lt;/FONT&gt; &lt;FONT color="#0000dd" face="Consolas" size="2"&gt;Panel Box&lt;/FONT&gt;&lt;STRONG&gt;&lt;FONT face="Consolas" size="2"&gt;(&lt;/FONT&gt;&lt;/STRONG&gt;&lt;FONT color="#800080" face="Consolas" size="2"&gt;"Target Data Table"&lt;/FONT&gt;&lt;FONT color="#000080" face="Consolas" size="2"&gt;,&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="Consolas" size="2"&gt;TargetListBox &lt;/FONT&gt;&lt;FONT color="#000080" face="Consolas" size="2"&gt;=&lt;/FONT&gt; &lt;FONT color="#0000dd" face="Consolas" size="2"&gt;List Box&lt;/FONT&gt;&lt;STRONG&gt;&lt;FONT face="Consolas" size="2"&gt;(&lt;/FONT&gt;&lt;/STRONG&gt;&lt;FONT face="Consolas" size="2"&gt;openTables&lt;/FONT&gt;&lt;FONT color="#000080" face="Consolas" size="2"&gt;,&lt;/FONT&gt;&lt;FONT face="Consolas" size="2"&gt; Max Selected&lt;STRONG&gt;(&lt;/STRONG&gt;&lt;/FONT&gt;&lt;STRONG&gt;&lt;FONT color="#008080" face="Consolas" size="2"&gt;1&lt;/FONT&gt;&lt;FONT face="Consolas" size="2"&gt;)))&lt;/FONT&gt;&lt;/STRONG&gt;&lt;FONT color="#000080" face="Consolas" size="2"&gt;,&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#0000dd" face="Consolas" size="2"&gt;Line Up Box&lt;/FONT&gt;&lt;STRONG&gt;&lt;FONT face="Consolas" size="2"&gt;(&lt;/FONT&gt;&lt;/STRONG&gt;&lt;FONT color="#0000dd" face="Consolas" size="2"&gt;NCol&lt;/FONT&gt;&lt;STRONG&gt;&lt;FONT face="Consolas" size="2"&gt;(&lt;/FONT&gt;&lt;FONT color="#008080" face="Consolas" size="2"&gt;2&lt;/FONT&gt;&lt;FONT face="Consolas" size="2"&gt;)&lt;/FONT&gt;&lt;/STRONG&gt;&lt;FONT color="#000080" face="Consolas" size="2"&gt;,&lt;/FONT&gt; &lt;FONT color="#0000dd" face="Consolas" size="2"&gt;Button Box&lt;/FONT&gt;&lt;STRONG&gt;&lt;FONT face="Consolas" size="2"&gt;(&lt;/FONT&gt;&lt;/STRONG&gt;&lt;FONT color="#800080" face="Consolas" size="2"&gt;"Ok"&lt;/FONT&gt;&lt;FONT color="#000080" face="Consolas" size="2"&gt;,&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="Consolas" size="2"&gt;SourceData &lt;/FONT&gt;&lt;FONT color="#000080" face="Consolas" size="2"&gt;=&lt;/FONT&gt;&lt;FONT face="Consolas" size="2"&gt; SourceListBox &lt;/FONT&gt;&lt;FONT color="#000080" face="Consolas" size="2"&gt;&amp;lt;&amp;lt;&lt;/FONT&gt; &lt;STRONG&gt;&lt;FONT color="#000080" face="Consolas" size="2"&gt;GetSelected&lt;/FONT&gt;&lt;/STRONG&gt;&lt;FONT color="#000080" face="Consolas" size="2"&gt;;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="Consolas" size="2"&gt;TargetData &lt;/FONT&gt;&lt;FONT color="#000080" face="Consolas" size="2"&gt;=&lt;/FONT&gt;&lt;FONT face="Consolas" size="2"&gt; TargetListBox &lt;/FONT&gt;&lt;FONT color="#000080" face="Consolas" size="2"&gt;&amp;lt;&amp;lt;&lt;/FONT&gt; &lt;STRONG&gt;&lt;FONT color="#000080" face="Consolas" size="2"&gt;GetSelected&lt;/FONT&gt;&lt;FONT face="Consolas" size="2"&gt;)&lt;/FONT&gt;&lt;/STRONG&gt;&lt;FONT color="#000080" face="Consolas" size="2"&gt;,&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#0000dd" face="Consolas" size="2"&gt;Button Box&lt;/FONT&gt;&lt;STRONG&gt;&lt;FONT face="Consolas" size="2"&gt;(&lt;/FONT&gt;&lt;/STRONG&gt;&lt;FONT color="#800080" face="Consolas" size="2"&gt;"Cancel"&lt;/FONT&gt;&lt;FONT color="#000080" face="Consolas" size="2"&gt;,&lt;/FONT&gt; &lt;FONT color="#0000dd" face="Consolas" size="2"&gt;Stop&lt;/FONT&gt;&lt;STRONG&gt;&lt;FONT face="Consolas" size="2"&gt;()&lt;/FONT&gt;&lt;/STRONG&gt;&lt;STRONG&gt;&lt;FONT face="Consolas" size="2"&gt;))&lt;/FONT&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="Consolas" size="2"&gt;&lt;STRONG&gt;)&lt;/STRONG&gt;&lt;/FONT&gt;&lt;FONT color="#000080" face="Consolas" size="2"&gt;;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="Consolas" size="2"&gt;dt1 &lt;/FONT&gt;&lt;FONT color="#000080" face="Consolas" size="2"&gt;=&lt;/FONT&gt; &lt;FONT color="#0000dd" face="Consolas" size="2"&gt;CurrentDataTable&lt;/FONT&gt;&lt;STRONG&gt;&lt;FONT face="Consolas" size="2"&gt;(&lt;/FONT&gt;&lt;/STRONG&gt;&lt;FONT face="Consolas" size="2"&gt;SourceData&lt;STRONG&gt;)&lt;/STRONG&gt;&lt;/FONT&gt;&lt;FONT color="#000080" face="Consolas" size="2"&gt;;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="Consolas" size="2"&gt;dt2 &lt;/FONT&gt;&lt;FONT color="#000080" face="Consolas" size="2"&gt;=&lt;/FONT&gt; &lt;FONT color="#0000dd" face="Consolas" size="2"&gt;CurrentDataTable&lt;/FONT&gt;&lt;STRONG&gt;&lt;FONT face="Consolas" size="2"&gt;(&lt;/FONT&gt;&lt;/STRONG&gt;&lt;FONT face="Consolas" size="2"&gt;TargetData&lt;STRONG&gt;)&lt;/STRONG&gt;&lt;/FONT&gt;&lt;FONT color="#000080" face="Consolas" size="2"&gt;;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 25 Aug 2017 23:59:01 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Assign-table-reference-to-selected-item-from-list-box/m-p/43654#M25254</guid>
      <dc:creator>RyMcQeN</dc:creator>
      <dc:date>2017-08-25T23:59:01Z</dc:date>
    </item>
    <item>
      <title>Re: Assign table reference to selected item from list box</title>
      <link>https://community.jmp.com/t5/Discussions/Assign-table-reference-to-selected-item-from-list-box/m-p/43655#M25255</link>
      <description>&lt;P&gt;First you want to use the function &lt;STRONG&gt;Data Table&lt;/STRONG&gt; and not Current Data Table in the last two lines.&lt;/P&gt;
&lt;P&gt;The argument to the Data Table needs to be the string name. If you show the contents of SourceData and TargetData you will see that the are lists. This is because in general listboxes allow a user to select multiple items. &amp;nbsp;So even though you are restricting the number of selected items to one the selection is still returned as a list.&lt;/P&gt;
&lt;P&gt;You can replace the last two lines with this:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;dt1 = Data Table( SourceData[1] );
dt2 = Data Table( TargetData[1] );&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;So now the first item of the lists is being used.&lt;/P&gt;
&lt;P&gt;This of course presumes that the user has selected at least one item from each list. You can add validation to a modal window. After the line containing the Modal message add:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;	&amp;lt;&amp;lt;OnValidate(
		If ( NItems(SourceData)&amp;gt;0  &amp;amp;  NItems(TargetData)&amp;gt;0,
			isValid = 1
		,
			isValid = 0;
			Beep()
		);
		isValid
	),&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;Obviously you could extend this validation (e.g. to verify that the source and destination names were not identical ).&lt;/P&gt;</description>
      <pubDate>Sat, 26 Aug 2017 12:29:04 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Assign-table-reference-to-selected-item-from-list-box/m-p/43655#M25255</guid>
      <dc:creator>David_Burnham</dc:creator>
      <dc:date>2017-08-26T12:29:04Z</dc:date>
    </item>
    <item>
      <title>Re: Assign table reference to selected item from list box</title>
      <link>https://community.jmp.com/t5/Discussions/Assign-table-reference-to-selected-item-from-list-box/m-p/43689#M25275</link>
      <description>&lt;P&gt;This worked perfectly.&amp;nbsp; Thank you Dave!&lt;/P&gt;</description>
      <pubDate>Mon, 28 Aug 2017 16:59:20 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Assign-table-reference-to-selected-item-from-list-box/m-p/43689#M25275</guid>
      <dc:creator>RyMcQeN</dc:creator>
      <dc:date>2017-08-28T16:59:20Z</dc:date>
    </item>
  </channel>
</rss>

