<?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: JSL how to reference a table in graph builder in Discussions</title>
    <link>https://community.jmp.com/t5/Discussions/JSL-how-to-reference-a-table-in-graph-builder/m-p/420985#M66971</link>
    <description>&lt;P&gt;I think JMP will set the dt2 as Current Data Table() and because you haven't specified reference for Graph Builder it will use Current Data Table(). To reference datatable you can use dt1 &amp;lt;&amp;lt; Graph Builder(...&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Here is Graph Builder example from Scripting Index:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="jthi_0-1632501339624.png" style="width: 400px;"&gt;&lt;img src="https://community.jmp.com/t5/image/serverpage/image-id/36068i4F90281EA112FD01/image-size/medium?v=v2&amp;amp;px=400" role="button" title="jthi_0-1632501339624.png" alt="jthi_0-1632501339624.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;Names Default To Here(1);
dt = Open("$SAMPLE_DATA/Big Class.jmp");
dt &amp;lt;&amp;lt; Graph Builder(
	Variables(X(:Sex), Y(:Height), Group X(:Age)),
	Elements(Box Plot(X, Y))
);&lt;/CODE&gt;&lt;/PRE&gt;</description>
    <pubDate>Fri, 24 Sep 2021 16:36:32 GMT</pubDate>
    <dc:creator>jthi</dc:creator>
    <dc:date>2021-09-24T16:36:32Z</dc:date>
    <item>
      <title>JSL how to reference a table in graph builder</title>
      <link>https://community.jmp.com/t5/Discussions/JSL-how-to-reference-a-table-in-graph-builder/m-p/420976#M66969</link>
      <description>&lt;P&gt;Hallo all,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I use a JSL script to generate two tables dt1 and dt1 from an SQL server and then I want graph builder to plot two columns from the first data table I generated. Example below:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;dt1 = Open Database( "BLA", "
SELECT col1, col2
FROM BLA", "data table 1" );

dt2 = Open Database( "BLA", "
SELECT col1, col2
FROM BLA", "data table 2" );

Graph Builder(
    Variables( X( :col1 ), Y( :Tcol2 ) ),
    Elements( Points( X, Y, Legend( 7 ) ) )
);&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;But graph builder seems to see only the last table I defined (dt2) not dt1. I tried:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;Graph Builder(
    Variables( X( dt1:col1 ), Y( dt1:Tcol2 ) ),
    Elements( Points( X, Y, Legend( 7 ) ) )
);&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;but it also does not work. How do I manage?&lt;/P&gt;
&lt;P&gt;Thanks for your help.&lt;/P&gt;</description>
      <pubDate>Fri, 09 Jun 2023 19:57:31 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/JSL-how-to-reference-a-table-in-graph-builder/m-p/420976#M66969</guid>
      <dc:creator>valeria</dc:creator>
      <dc:date>2023-06-09T19:57:31Z</dc:date>
    </item>
    <item>
      <title>Re: JSL how to reference a table in graph builder</title>
      <link>https://community.jmp.com/t5/Discussions/JSL-how-to-reference-a-table-in-graph-builder/m-p/420983#M66970</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Specifically, to point to a specific table when working with multiple data tables, you need to point to the table when invoking Graph Builder:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;dt1 &amp;lt;&amp;lt; Graph Builder(
Variables( X( :col1 ), Y( :Tcol2 ) ),
Elements( Points( X, Y, Legend( 7 ) ) )
);&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;However, I am not familiar with a method to create a Graph Builder output based on columns selected from two different tables. Hence, you probably need to create a temporary table that contains the desired columns. I'll let others to chime in on this topic.&lt;/P&gt;
&lt;P&gt;Best,&lt;/P&gt;
&lt;P&gt;TS&lt;/P&gt;</description>
      <pubDate>Fri, 24 Sep 2021 16:35:34 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/JSL-how-to-reference-a-table-in-graph-builder/m-p/420983#M66970</guid>
      <dc:creator>Thierry_S</dc:creator>
      <dc:date>2021-09-24T16:35:34Z</dc:date>
    </item>
    <item>
      <title>Re: JSL how to reference a table in graph builder</title>
      <link>https://community.jmp.com/t5/Discussions/JSL-how-to-reference-a-table-in-graph-builder/m-p/420985#M66971</link>
      <description>&lt;P&gt;I think JMP will set the dt2 as Current Data Table() and because you haven't specified reference for Graph Builder it will use Current Data Table(). To reference datatable you can use dt1 &amp;lt;&amp;lt; Graph Builder(...&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Here is Graph Builder example from Scripting Index:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="jthi_0-1632501339624.png" style="width: 400px;"&gt;&lt;img src="https://community.jmp.com/t5/image/serverpage/image-id/36068i4F90281EA112FD01/image-size/medium?v=v2&amp;amp;px=400" role="button" title="jthi_0-1632501339624.png" alt="jthi_0-1632501339624.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;Names Default To Here(1);
dt = Open("$SAMPLE_DATA/Big Class.jmp");
dt &amp;lt;&amp;lt; Graph Builder(
	Variables(X(:Sex), Y(:Height), Group X(:Age)),
	Elements(Box Plot(X, Y))
);&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Fri, 24 Sep 2021 16:36:32 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/JSL-how-to-reference-a-table-in-graph-builder/m-p/420985#M66971</guid>
      <dc:creator>jthi</dc:creator>
      <dc:date>2021-09-24T16:36:32Z</dc:date>
    </item>
    <item>
      <title>Re: JSL how to reference a table in graph builder</title>
      <link>https://community.jmp.com/t5/Discussions/JSL-how-to-reference-a-table-in-graph-builder/m-p/421222#M67005</link>
      <description>&lt;P&gt;Thank you very much Thierry, that worked! I understand, I will merge the tables if I have to use the data in the same graph builder.&lt;/P&gt;</description>
      <pubDate>Mon, 27 Sep 2021 06:47:54 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/JSL-how-to-reference-a-table-in-graph-builder/m-p/421222#M67005</guid>
      <dc:creator>valeria</dc:creator>
      <dc:date>2021-09-27T06:47:54Z</dc:date>
    </item>
  </channel>
</rss>

