<?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: Why doesn't Current Data Table work for me in Discussions</title>
    <link>https://community.jmp.com/t5/Discussions/Why-doesn-t-Current-Data-Table-work-for-me/m-p/845912#M102052</link>
    <description>&lt;P&gt;What do you need Current Data Table() for? You already have the reference to the table and you can use that instead.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Outside of the tip that you shouldn't be using Current data table() in case like this, that syntax should be correct if dtIVInitial is a table. You can just use Show with the dtIVInitial to show what it has&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;Names Default To Here(1);

dt = Open("$SAMPLE_DATA/Big Class.jmp");
dt1 = Open("$SAMPLE_DATA/Big Class Families.jmp");

show(Current Data Table());
Current Data Table(dt);
show(Current Data Table());&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Tue, 04 Mar 2025 18:51:52 GMT</pubDate>
    <dc:creator>jthi</dc:creator>
    <dc:date>2025-03-04T18:51:52Z</dc:date>
    <item>
      <title>Why doesn't Current Data Table work for me</title>
      <link>https://community.jmp.com/t5/Discussions/Why-doesn-t-Current-Data-Table-work-for-me/m-p/845892#M102051</link>
      <description>&lt;DIV&gt;I am reading a csv file then iam calling current data table on that and it give me error -&amp;nbsp;&lt;STRONG&gt;Argument must contain data table reference in access or evaluation of 'Current Data Table' , Current Data Table/*###*/(dtIVInitial)&lt;/STRONG&gt;&lt;/DIV&gt;&lt;DIV&gt;Even though the type of dtIVInitial is Table ? What am I doin wrong. Also this doesnt even open a datatable.&lt;BR /&gt;&lt;BR /&gt;&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;// Construct the full paths
initialCSVPath = dataFolderInitial || "/" || initialCSVFile;
finalCSVPath = dataFolderFinal || "/" || finalCSVFile;

// Debugging Output
Show("Matching Initial CSV:", initialCSVPath);
Show("Matching Final CSV:", finalCSVPath);

// Open Files

If( File Exists(initialCSVPath),
Show("Initial file exists");
&amp;nbsp; &amp;nbsp; dtIVInitial = Open(initialCSVPath,
Import Settings(
End Of Line( CRLF, CR, LF ),
End Of Field( Tab, Comma, CSV( 1 ) ),
Strip Quotes( 1 ),
Use Apostrophe as Quotation Mark( 0 ),
Use Regional Settings( 0 ),
Scan Whole File( 1 ),
Treat empty columns as numeric( 0 ),
CompressNumericColumns( 0 ),
CompressCharacterColumns( 0 ),
CompressAllowListCheck( 0 ),
Labels( 1 ),
Column Names Start( 1 ),
Data Starts( 2 ),
Lines To Read( "All" )
));
Wait(1.0);
dtIVInitial &amp;lt;&amp;lt; Set Name("IV Curves Initial Data");
,
&amp;nbsp; &amp;nbsp; Throw("Initial IV Curve CSV file not found! Check folder structure.");
);

If( File Exists(finalCSVPath),
Show("Final file exists");
&amp;nbsp; &amp;nbsp; dtIVFinal = Open(finalCSVPath,
Import Settings(
End Of Line( CRLF, CR, LF ),
End Of Field( Tab, Comma, CSV( 1 ) ),
Strip Quotes( 1 ),
Use Apostrophe as Quotation Mark( 0 ),
Use Regional Settings( 0 ),
Scan Whole File( 1 ),
Treat empty columns as numeric( 0 ),
CompressNumericColumns( 0 ),
CompressCharacterColumns( 0 ),
CompressAllowListCheck( 0 ),
Labels( 1 ),
Column Names Start( 1 ),
Data Starts( 2 ),
Lines To Read( "All" )
));

Wait(1.0);
dtIVFinal &amp;lt;&amp;lt; Set Name("IV Curves Final Data");
,
&amp;nbsp; &amp;nbsp; Throw("Final IV Curve CSV file not found! Check folder structure.");
);

Show(Type(dtIVInitial));&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; // "Table"
Show(Type(dtIVFinal));&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; // "Table"

Show(IsEmpty(dtIVInitial));&amp;nbsp;&amp;nbsp;
Show(IsEmpty(dtIVFinal));&amp;nbsp;&amp;nbsp;&lt;BR /&gt;Current&amp;nbsp;Data&amp;nbsp;Table(dtIVInitial);&lt;/CODE&gt;&lt;/PRE&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;</description>
      <pubDate>Tue, 04 Mar 2025 18:32:53 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Why-doesn-t-Current-Data-Table-work-for-me/m-p/845892#M102051</guid>
      <dc:creator>HV0508</dc:creator>
      <dc:date>2025-03-04T18:32:53Z</dc:date>
    </item>
    <item>
      <title>Re: Why doesn't Current Data Table work for me</title>
      <link>https://community.jmp.com/t5/Discussions/Why-doesn-t-Current-Data-Table-work-for-me/m-p/845912#M102052</link>
      <description>&lt;P&gt;What do you need Current Data Table() for? You already have the reference to the table and you can use that instead.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Outside of the tip that you shouldn't be using Current data table() in case like this, that syntax should be correct if dtIVInitial is a table. You can just use Show with the dtIVInitial to show what it has&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;Names Default To Here(1);

dt = Open("$SAMPLE_DATA/Big Class.jmp");
dt1 = Open("$SAMPLE_DATA/Big Class Families.jmp");

show(Current Data Table());
Current Data Table(dt);
show(Current Data Table());&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 04 Mar 2025 18:51:52 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Why-doesn-t-Current-Data-Table-work-for-me/m-p/845912#M102052</guid>
      <dc:creator>jthi</dc:creator>
      <dc:date>2025-03-04T18:51:52Z</dc:date>
    </item>
    <item>
      <title>Re: Why doesn't Current Data Table work for me</title>
      <link>https://community.jmp.com/t5/Discussions/Why-doesn-t-Current-Data-Table-work-for-me/m-p/845925#M102054</link>
      <description>&lt;P&gt;I have multiple tables in my script .In&amp;nbsp; later stages I have to make certain graphs from each table . So I usually set the current table to the one form which i have to make graph from at that time and then make the graph. Not sure if that is the right approach.&lt;/P&gt;</description>
      <pubDate>Tue, 04 Mar 2025 19:15:57 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Why-doesn-t-Current-Data-Table-work-for-me/m-p/845925#M102054</guid>
      <dc:creator>HV0508</dc:creator>
      <dc:date>2025-03-04T19:15:57Z</dc:date>
    </item>
    <item>
      <title>Re: Why doesn't Current Data Table work for me</title>
      <link>https://community.jmp.com/t5/Discussions/Why-doesn-t-Current-Data-Table-work-for-me/m-p/845926#M102055</link>
      <description>&lt;DIV&gt;Hey&amp;nbsp;&lt;a href="https://community.jmp.com/t5/user/viewprofilepage/user-id/14366"&gt;@jthi&lt;/a&gt;&amp;nbsp; Thankyou so much for your instant reply. It turns out later in script i was closing the table , hence the issue .&amp;nbsp;&lt;/DIV&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 04 Mar 2025 19:25:12 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Why-doesn-t-Current-Data-Table-work-for-me/m-p/845926#M102055</guid>
      <dc:creator>HV0508</dc:creator>
      <dc:date>2025-03-04T19:25:12Z</dc:date>
    </item>
    <item>
      <title>Re: Why doesn't Current Data Table work for me</title>
      <link>https://community.jmp.com/t5/Discussions/Why-doesn-t-Current-Data-Table-work-for-me/m-p/845927#M102056</link>
      <description>&lt;P&gt;That can be very very risky approach. It is better to send the platform message directly to the data table reference if you can easily get it without current data table (this is the case quite commonly). Here is one example with graph builder and distribution with some extra prints to log just to show how the table reference can be utilized&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;Names Default To Here(1); 

dt = open("$SAMPLE_DATA/Big Class.jmp");

gb = dt &amp;lt;&amp;lt; Graph Builder(
	Variables(X(:weight), Y(:height), Overlay(:sex)),
	Elements(Points(X, Y, Legend(9)), Line Of Fit(X, Y, Legend(11)))
);
dist = dt &amp;lt;&amp;lt; Distribution(Column(:Age, :Weight));

nw = New Window("",
	H List Box(
		gb2 = dt &amp;lt;&amp;lt; Graph Builder(
			Variables(X(:weight), Y(:height)),
			Elements(Points(X, Y, Legend(9)))
		),
		dist2 = dist = dt &amp;lt;&amp;lt; Distribution(Column(:Age));
	)
);

Show(dt, gb, dist, gb &amp;lt;&amp;lt; Get Data Table, gb2, dist2);&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Tue, 04 Mar 2025 19:33:23 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Why-doesn-t-Current-Data-Table-work-for-me/m-p/845927#M102056</guid>
      <dc:creator>jthi</dc:creator>
      <dc:date>2025-03-04T19:33:23Z</dc:date>
    </item>
    <item>
      <title>Re: Why doesn't Current Data Table work for me</title>
      <link>https://community.jmp.com/t5/Discussions/Why-doesn-t-Current-Data-Table-work-for-me/m-p/845928#M102057</link>
      <description>&lt;P&gt;This is nice , i will apply this change in my current code&lt;/P&gt;</description>
      <pubDate>Tue, 04 Mar 2025 19:38:50 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Why-doesn-t-Current-Data-Table-work-for-me/m-p/845928#M102057</guid>
      <dc:creator>HV0508</dc:creator>
      <dc:date>2025-03-04T19:38:50Z</dc:date>
    </item>
  </channel>
</rss>

