<?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: Workaround to &amp;quot;update&amp;quot; function in script in Discussions</title>
    <link>https://community.jmp.com/t5/Discussions/Workaround-to-quot-update-quot-function-in-script/m-p/67218#M34565</link>
    <description>&lt;P&gt;try changing&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;dt &amp;lt;&amp;lt; Update( With( dt1 ), By Matching Columns( name == name ) );&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;to&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;dt &amp;lt;&amp;lt; Update( With( dt1 ), Match Columns( name== name ) );&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;Based on the commented out lines of my script, my previous attempt at joining used the former format and didn't work when I changed to update. Syntax is different&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Wed, 08 Aug 2018 17:54:57 GMT</pubDate>
    <dc:creator>mikedriscoll</dc:creator>
    <dc:date>2018-08-08T17:54:57Z</dc:date>
    <item>
      <title>Workaround to "update" function in script</title>
      <link>https://community.jmp.com/t5/Discussions/Workaround-to-quot-update-quot-function-in-script/m-p/67056#M34546</link>
      <description>&lt;P&gt;Hello JMP community,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have a data table that is dependent on another data table. I've tried updating it with the update function, but it seems to not do anything. Instead, what this script is doing is opening a new data table window with the selected subset instead of updating the current table. How can I get it to update the currently open datatable "dt" with the subset of "dtU"? Thanks!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;// Open Sample Data 
dt = Open("KrF CDU Data table.jmp");
dtU = Open( "Exposure_Summary_Data.jmp" ); 

// Making subset of data
dtU &amp;lt;&amp;lt; Clear Column Selection();
dtU &amp;lt;&amp;lt; Select Where(contains("KrF", :Type));  
Column(dtU,"F23")&amp;lt;&amp;lt; Set Selected(1); 
dtU &amp;lt;&amp;lt; Invert Column Selection; 
dt1 = dtU &amp;lt;&amp;lt; Subset(Selected Rows(1),Selected Columns(1,:Wafer Code));

// Updating with subset
dt &amp;lt;&amp;lt; Update(With(dt1),By Matching Columns(name==name),);&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Tue, 07 Aug 2018 22:41:41 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Workaround-to-quot-update-quot-function-in-script/m-p/67056#M34546</guid>
      <dc:creator>jmpandvba</dc:creator>
      <dc:date>2018-08-07T22:41:41Z</dc:date>
    </item>
    <item>
      <title>Re: Workaround to "update" function in script</title>
      <link>https://community.jmp.com/t5/Discussions/Workaround-to-quot-update-quot-function-in-script/m-p/67080#M34551</link>
      <description>&lt;P&gt;Some of your JSL looks wrong or strange:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;dtU &amp;lt;&amp;lt; Select Where(contains("KrF", :Type));  &lt;/PRE&gt;&lt;P&gt;that should be&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;dtU &amp;lt;&amp;lt; Select Where(contains( :Type, "KrF:));  &lt;/PRE&gt;&lt;P&gt;Also, this line two looks strange Selected Columns(1,:Wafer Code) and&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;dt1 = dtU &amp;lt;&amp;lt; Subset(Selected Rows(1),Selected Columns(1,:Wafer Code));&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;You did not mention which table is dependent. By default, subset tables are not dependent.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;What does the Log file report?&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 08 Aug 2018 03:35:21 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Workaround-to-quot-update-quot-function-in-script/m-p/67080#M34551</guid>
      <dc:creator>gzmorgan0</dc:creator>
      <dc:date>2018-08-08T03:35:21Z</dc:date>
    </item>
    <item>
      <title>Re: Workaround to "update" function in script</title>
      <link>https://community.jmp.com/t5/Discussions/Workaround-to-quot-update-quot-function-in-script/m-p/67155#M34564</link>
      <description>&lt;P&gt;Whoops, meant to write that line as&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;dt1 = dtU &amp;lt;&amp;lt; Subset(Selected Rows(1),Selected Columns(1));&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;However, it still doesn't update dt ("KrF CDU Data table.jmp"). I am trying to update the KrF data table with data from the Exposure Table (dtU).&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;This is what the log looks like:&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;Name Unresolved: name in access or evaluation of 'name' , name/*###*/

In the following script, error marked by /*###*/
Clear Log();
Clear Globals();
Close All( DataTables, "No Save" );
dt = Open( "KrF CDU Data table.jmp" );
dtU = Open( "Exposure_Summary_Data.jmp" );
dtU &amp;lt;&amp;lt; Clear Column Selection();
dtU &amp;lt;&amp;lt; Select Where( Contains( :Type, "KrF" ) );
Column( dtU, "F23" ) &amp;lt;&amp;lt; Set Selected( 1 );
dtU &amp;lt;&amp;lt; Invert Column Selection;
dt1 = dtU &amp;lt;&amp;lt; Subset( Selected Rows( 1 ), Selected Columns( 1 ) );
dt &amp;lt;&amp;lt; Update( With( dt1 ), By Matching Columns( name/*###*/ == name ) );&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;So there is some sort of error with the update line? I'm not sure, but that's what the log is reporting&lt;/P&gt;</description>
      <pubDate>Wed, 08 Aug 2018 15:44:22 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Workaround-to-quot-update-quot-function-in-script/m-p/67155#M34564</guid>
      <dc:creator>jmpandvba</dc:creator>
      <dc:date>2018-08-08T15:44:22Z</dc:date>
    </item>
    <item>
      <title>Re: Workaround to "update" function in script</title>
      <link>https://community.jmp.com/t5/Discussions/Workaround-to-quot-update-quot-function-in-script/m-p/67218#M34565</link>
      <description>&lt;P&gt;try changing&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;dt &amp;lt;&amp;lt; Update( With( dt1 ), By Matching Columns( name == name ) );&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;to&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;dt &amp;lt;&amp;lt; Update( With( dt1 ), Match Columns( name== name ) );&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;Based on the commented out lines of my script, my previous attempt at joining used the former format and didn't work when I changed to update. Syntax is different&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 08 Aug 2018 17:54:57 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Workaround-to-quot-update-quot-function-in-script/m-p/67218#M34565</guid>
      <dc:creator>mikedriscoll</dc:creator>
      <dc:date>2018-08-08T17:54:57Z</dc:date>
    </item>
    <item>
      <title>Re: Workaround to "update" function in script</title>
      <link>https://community.jmp.com/t5/Discussions/Workaround-to-quot-update-quot-function-in-script/m-p/67228#M34566</link>
      <description>Tried the change, but instead of updating the KrF data table (dt), it only opens a new subset, and it does not update the table dt. Do I need to connect both to an odbc server? Both tables are still opening, so JMP definitely sees both tables.</description>
      <pubDate>Wed, 08 Aug 2018 18:08:38 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Workaround-to-quot-update-quot-function-in-script/m-p/67228#M34566</guid>
      <dc:creator>jmpandvba</dc:creator>
      <dc:date>2018-08-08T18:08:38Z</dc:date>
    </item>
    <item>
      <title>Re: Workaround to "update" function in script</title>
      <link>https://community.jmp.com/t5/Discussions/Workaround-to-quot-update-quot-function-in-script/m-p/67229#M34567</link>
      <description>&lt;P&gt;Not sure if I'm interpreting what you're trying to do here correctly, but here is my interpretation, with some sample data.&amp;nbsp; You'll need to add a column called name after the stop() command.&amp;nbsp; This worked ok for me.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Edit: I think I misunderstood something. ... you mean you're trying to update a table that is locked because it is dependent, like a summary, JMP may force a new table. I'm not sure about that.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;Clear Log();
Clear Globals();
//Close All( DataTables, "No Save" );
dt = Open( "$SAMPLE_DATA/Students.jmp" );
dtU = Open( "$SAMPLE_DATA/Big Class.jmp" );
dtU &amp;lt;&amp;lt; Clear Column Selection();
dtU &amp;lt;&amp;lt; Select Where( :age == 12 );
Column( dtU, "age" ) &amp;lt;&amp;lt; Set Selected( 1 );
dtU &amp;lt;&amp;lt; Invert Column Selection;
dt1 = dtU &amp;lt;&amp;lt; Subset( Selected Rows( 1 ), Selected Columns( 1 ) );

stop();
// run up to here, create an extra column called name in the dt (students.jmp) with some names from dtU (big class), then run next line
dt &amp;lt;&amp;lt; Update( With( dt1 ), By Matching Columns( name == name ) );&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;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 08 Aug 2018 18:36:26 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Workaround-to-quot-update-quot-function-in-script/m-p/67229#M34567</guid>
      <dc:creator>mikedriscoll</dc:creator>
      <dc:date>2018-08-08T18:36:26Z</dc:date>
    </item>
    <item>
      <title>Re: Workaround to "update" function in script</title>
      <link>https://community.jmp.com/t5/Discussions/Workaround-to-quot-update-quot-function-in-script/m-p/67246#M34571</link>
      <description>&lt;P&gt;Since we cannot see the tables, this is just a guess of things to try&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;Check that the column name exists in both, both have the same data type (likely character) and modeling type (likely nominal).&lt;/LI&gt;&lt;LI&gt;use :name==:name or dt:name == dt1:name&lt;/LI&gt;&lt;LI&gt;check if any of the columns in dt have functions, especially if the columns to be updated have functions. I think you have to remove the function beforte updating.&amp;nbsp;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;That's a bit of troubleshooting ideas.&lt;/P&gt;</description>
      <pubDate>Wed, 08 Aug 2018 19:45:32 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Workaround-to-quot-update-quot-function-in-script/m-p/67246#M34571</guid>
      <dc:creator>gzmorgan0</dc:creator>
      <dc:date>2018-08-08T19:45:32Z</dc:date>
    </item>
    <item>
      <title>Re: Workaround to "update" function in script</title>
      <link>https://community.jmp.com/t5/Discussions/Workaround-to-quot-update-quot-function-in-script/m-p/67432#M34613</link>
      <description>&lt;P&gt;So I've checked all the data types for the matching columns, and they are the same: same order and same data types. None of the columns have functions as well. I've attached the data sets as an image and my current code. I am totally lost, so any help is most appreciated. Thank you all!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;//Clean up 
Clear Log(); Clear Globals(); //Close All(DataTables,"No Save"); 

// Open Sample Data 

dtU = Open( "Exposure_Summary_Data.jmp" ); 

// Making subset of data
dtU &amp;lt;&amp;lt; Clear Column Selection();
dtU &amp;lt;&amp;lt; Select Where(contains(:Type,"KrF"));  
Column(dtU,"F23")&amp;lt;&amp;lt; Set Selected(1); 
dtU &amp;lt;&amp;lt; Invert Column Selection; 
dt1 = dtU &amp;lt;&amp;lt; Subset(Selected Rows(1),Selected Columns(1));

// Opening other data table and updating 
dt = Open("KrF CDU Data table 1.jmp");
dt &amp;lt;&amp;lt; Update( With( dt1 ), Match Columns( dt:name == dt1:name ) ); //This is still not running
dt &amp;lt;&amp;lt; Save( "KrF CDU Data table 1.jmp" );&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sat, 11 Aug 2018 03:32:27 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Workaround-to-quot-update-quot-function-in-script/m-p/67432#M34613</guid>
      <dc:creator>jmpandvba</dc:creator>
      <dc:date>2018-08-11T03:32:27Z</dc:date>
    </item>
    <item>
      <title>Re: Workaround to "update" function in script</title>
      <link>https://community.jmp.com/t5/Discussions/Workaround-to-quot-update-quot-function-in-script/m-p/67527#M34632</link>
      <description>&lt;P&gt;In this line of code, "name" refers to the column name. You aren't showing all of the column names but do you definitely have a column called "name" in both?&lt;/P&gt;&lt;PRE class=" language-jsl"&gt;&lt;CODE class="  language-jsl"&gt;dt &lt;SPAN class="token operator"&gt;&amp;lt;&lt;/SPAN&gt;&lt;SPAN class="token operator"&gt;&amp;lt;&lt;/SPAN&gt;&lt;SPAN class="token messages"&gt; Update&lt;/SPAN&gt;&lt;SPAN class="token punctuation"&gt;(&lt;/SPAN&gt; With&lt;SPAN class="token punctuation"&gt;(&lt;/SPAN&gt; dt1 &lt;SPAN class="token punctuation"&gt;)&lt;/SPAN&gt;&lt;SPAN class="token punctuation"&gt;,&lt;/SPAN&gt; Match Columns&lt;SPAN class="token punctuation"&gt;(&lt;/SPAN&gt; dt&lt;SPAN class="token punctuation"&gt;:&lt;/SPAN&gt;name &lt;SPAN class="token operator"&gt;==&lt;/SPAN&gt; dt1&lt;SPAN class="token punctuation"&gt;:&lt;/SPAN&gt;name &lt;SPAN class="token punctuation"&gt;)&lt;/SPAN&gt; &lt;SPAN class="token punctuation"&gt;)&lt;/SPAN&gt;&lt;SPAN class="token punctuation"&gt;;&lt;/SPAN&gt; &lt;SPAN class="token comment"&gt;//This is still not runnin&lt;/SPAN&gt;&lt;/CODE&gt;g&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;Try doing this operation manually from the Tables-&amp;gt;update menu.&amp;nbsp; When you get the output you want, look at the source script in the top left (right click on source, click to see the script) and inspect that code to help get exactly what you want into your JSL.&lt;/P&gt;</description>
      <pubDate>Fri, 10 Aug 2018 17:34:44 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Workaround-to-quot-update-quot-function-in-script/m-p/67527#M34632</guid>
      <dc:creator>mikedriscoll</dc:creator>
      <dc:date>2018-08-10T17:34:44Z</dc:date>
    </item>
    <item>
      <title>Re: Workaround to "update" function in script</title>
      <link>https://community.jmp.com/t5/Discussions/Workaround-to-quot-update-quot-function-in-script/m-p/67531#M34635</link>
      <description>&lt;P&gt;So I did what you said and manually updated the table, this is the associated code&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;Data Table( "KrF CDU data table 1" ) &amp;lt;&amp;lt; Update(&lt;BR /&gt; With( Data Table( "Subset of Exposure_Summary_Data" ) ),&lt;BR /&gt; Match Columns( :Wafer Code = :Wafer Code )&lt;BR /&gt;)&lt;/PRE&gt;&lt;P&gt;So, I applied this to my code directly&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;dt &amp;lt;&amp;lt; Update( With( dt1 ), Match Columns( dt:Wafer Code= dt1:Wafer code ) );&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;However, instead of updating all the rows, it just updates the first row and copies that row for all rows, as illustrated below. Do I need to loop it for all rows?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sat, 11 Aug 2018 03:33:08 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Workaround-to-quot-update-quot-function-in-script/m-p/67531#M34635</guid>
      <dc:creator>jmpandvba</dc:creator>
      <dc:date>2018-08-11T03:33:08Z</dc:date>
    </item>
    <item>
      <title>Re: Workaround to "update" function in script</title>
      <link>https://community.jmp.com/t5/Discussions/Workaround-to-quot-update-quot-function-in-script/m-p/67553#M34650</link>
      <description>&lt;P&gt;Match needs to specify as many columns that make this unique. So you might need match by multiple columns, for example :Experiment name == :Experiment name, :Stack==:Stack, :Wafer Code==:Wafer Code, :Metrology Recipe==:Metrology.&lt;/P&gt;&lt;P&gt;These are just suggestions.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;You need to choose which columns make each row unique, then match accordingly.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sat, 11 Aug 2018 02:21:55 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Workaround-to-quot-update-quot-function-in-script/m-p/67553#M34650</guid>
      <dc:creator>gzmorgan0</dc:creator>
      <dc:date>2018-08-11T02:21:55Z</dc:date>
    </item>
  </channel>
</rss>

