<?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 switch between Device table in Discussions</title>
    <link>https://community.jmp.com/t5/Discussions/How-to-switch-between-Device-table/m-p/489960#M73279</link>
    <description>&lt;P&gt;If you are doing this in JSL, try assigning a reference to the tables you want to manipulate, then use the appropriate reference for subsequent operations. For example:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;NamesDefaultToHere(1);

dt1 = Open("$SAMPLE_DATA/Big Class.jmp");
dt2 = Open("$SAMPLE_DATA/Bands Data.jmp");
Print(CurrentDataTable() &amp;lt;&amp;lt; getName);
Print(dt1 &amp;lt;&amp;lt; getName);
Print(dt2 &amp;lt;&amp;lt; getName);&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Mon, 23 May 2022 11:23:39 GMT</pubDate>
    <dc:creator>ian_jmp</dc:creator>
    <dc:date>2022-05-23T11:23:39Z</dc:date>
    <item>
      <title>How to switch between Device table</title>
      <link>https://community.jmp.com/t5/Discussions/How-to-switch-between-Device-table/m-p/489879#M73276</link>
      <description>&lt;P&gt;Hello,&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I didn't found any function for this but it must exist.&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have one table full of data "Data" where I make some calculation, then I create a new data table "Newdata".&lt;/P&gt;&lt;P&gt;My point is that after I created my new data table "Newdata", i don't manage to select my first table of data "Data" to make new calculations.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;That's why Im looking for something to say "don't use the data table you have just created but select the first one and use it".&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I hope it's clear enough.&amp;nbsp;&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:48:48 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/How-to-switch-between-Device-table/m-p/489879#M73276</guid>
      <dc:creator>Nuroffen</dc:creator>
      <dc:date>2023-06-10T23:48:48Z</dc:date>
    </item>
    <item>
      <title>Re: How to switch between Device table</title>
      <link>https://community.jmp.com/t5/Discussions/How-to-switch-between-Device-table/m-p/489960#M73279</link>
      <description>&lt;P&gt;If you are doing this in JSL, try assigning a reference to the tables you want to manipulate, then use the appropriate reference for subsequent operations. For example:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;NamesDefaultToHere(1);

dt1 = Open("$SAMPLE_DATA/Big Class.jmp");
dt2 = Open("$SAMPLE_DATA/Bands Data.jmp");
Print(CurrentDataTable() &amp;lt;&amp;lt; getName);
Print(dt1 &amp;lt;&amp;lt; getName);
Print(dt2 &amp;lt;&amp;lt; getName);&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 23 May 2022 11:23:39 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/How-to-switch-between-Device-table/m-p/489960#M73279</guid>
      <dc:creator>ian_jmp</dc:creator>
      <dc:date>2022-05-23T11:23:39Z</dc:date>
    </item>
    <item>
      <title>Re: How to switch between Device table</title>
      <link>https://community.jmp.com/t5/Discussions/How-to-switch-between-Device-table/m-p/490284#M73284</link>
      <description>&lt;P&gt;Strongly agree with Ian's suggestion to assign references to tables in JSL, using the table reference wherever it is needed:&lt;/P&gt;
&lt;PRE&gt;table1 &amp;lt;&amp;lt; Bivariate(...)&lt;/PRE&gt;
&lt;P&gt;New tables are generally made "current", and actions such as activating a window can change the current table.&amp;nbsp; It is possible to use Current Data Table() to switch between them, but your script will be much more robust using the dt references.&lt;/P&gt;
&lt;P&gt;Also shown in Ian's example is the use of Names Default To Here(1), which can help to insulate your script from another script using the same reference symbols.&lt;/P&gt;</description>
      <pubDate>Mon, 23 May 2022 14:20:23 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/How-to-switch-between-Device-table/m-p/490284#M73284</guid>
      <dc:creator>danschikore</dc:creator>
      <dc:date>2022-05-23T14:20:23Z</dc:date>
    </item>
    <item>
      <title>Re: How to switch between Device table</title>
      <link>https://community.jmp.com/t5/Discussions/How-to-switch-between-Device-table/m-p/490790#M73285</link>
      <description>&lt;P&gt;If you are not comfortable scripting, you could potentially use a Virtual Join between the 2 tables to access data from "Data" into "Newdata". Here's a link to a brief JMP video on the topic:&amp;nbsp;&lt;A href="https://community.jmp.com/t5/JMP-On-Air/Virtual-Joins/ta-p/256749" target="_blank"&gt;Virtual Joins - JMP User Community&lt;/A&gt;&lt;/P&gt;&lt;P&gt;If you are using the Formula Editor in "Newdata" for calculations, you could reference data from the "Data" table by using a column reference such as:&lt;/P&gt;&lt;P&gt;as column (data table("Data"), "my_column_data")&lt;/P&gt;&lt;P&gt;where "my_column_data" is the name of the column in "Data" table which contains the data you want to use in "Newdata".&lt;/P&gt;&lt;P&gt;I agree with Ian and Dan that scripting is the most flexible and powerful way to go. I myself prefer scripting but fortunately there are often several ways to get the job done in JMP even if you're not a scripter.&lt;/P&gt;</description>
      <pubDate>Mon, 23 May 2022 19:50:28 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/How-to-switch-between-Device-table/m-p/490790#M73285</guid>
      <dc:creator>mark_anawis</dc:creator>
      <dc:date>2022-05-23T19:50:28Z</dc:date>
    </item>
    <item>
      <title>Re: How to switch between Device table</title>
      <link>https://community.jmp.com/t5/Discussions/How-to-switch-between-Device-table/m-p/494196#M73378</link>
      <description>&lt;P&gt;Thanks to&amp;nbsp;&amp;nbsp;ian_jmp,&amp;nbsp;danschikore&amp;nbsp;and&amp;nbsp;mark_anawis&amp;nbsp;for your awnser.&lt;/P&gt;&lt;P&gt;Opening the table is smart and work perfectly !&lt;/P&gt;</description>
      <pubDate>Fri, 27 May 2022 10:08:30 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/How-to-switch-between-Device-table/m-p/494196#M73378</guid>
      <dc:creator>Nuroffen</dc:creator>
      <dc:date>2022-05-27T10:08:30Z</dc:date>
    </item>
  </channel>
</rss>

