<?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: Update table according to the date less than or equal to the reference file in Discussions</title>
    <link>https://community.jmp.com/t5/Discussions/Update-table-according-to-the-date-less-than-or-equal-to-the/m-p/682470#M86802</link>
    <description>&lt;P&gt;I suspect that you have a version of JMP that does not support&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;For Each()&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;so if you change the For Each section to&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;For(row=1, row&amp;lt;= N Rows( dtA ), row++,
	dtA:Ref[row] = dtB:ref[Max(
		dtB &amp;lt;&amp;lt; get rows where( dtB:date &amp;lt;= dtA:date[row] )
	)]
);&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;it should work.&lt;/P&gt;</description>
    <pubDate>Fri, 29 Sep 2023 17:42:56 GMT</pubDate>
    <dc:creator>txnelson</dc:creator>
    <dc:date>2023-09-29T17:42:56Z</dc:date>
    <item>
      <title>Update table according to the date less than or equal to the reference file</title>
      <link>https://community.jmp.com/t5/Discussions/Update-table-according-to-the-date-less-than-or-equal-to-the/m-p/682139#M86777</link>
      <description>&lt;P&gt;Hi all,&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have 2 tables where the dtA is my original file and dtB is my reference file. What I would wanted to do is to have dtA be updated according to the date less than or equal to the reference file.&lt;/P&gt;&lt;P&gt;For example,&amp;nbsp;&lt;/P&gt;&lt;P&gt;Table dtA&lt;/P&gt;&lt;TABLE border="1"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;Date&amp;nbsp;&lt;/TD&gt;&lt;TD&gt;Model&lt;/TD&gt;&lt;TD&gt;Qty&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;06/24/2023&lt;/TD&gt;&lt;TD&gt;A&lt;/TD&gt;&lt;TD&gt;23&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;06/30/2023&lt;/TD&gt;&lt;TD&gt;A&lt;/TD&gt;&lt;TD&gt;25&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;07/01/2023&lt;/TD&gt;&lt;TD&gt;A&lt;/TD&gt;&lt;TD&gt;34&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;07/05/2023&lt;/TD&gt;&lt;TD&gt;A&lt;/TD&gt;&lt;TD&gt;50&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Table dtB&lt;/P&gt;&lt;TABLE border="1"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;Date&amp;nbsp;&lt;/TD&gt;&lt;TD&gt;Model&lt;/TD&gt;&lt;TD&gt;Ref&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;06/01/2023&lt;/TD&gt;&lt;TD&gt;A&lt;/TD&gt;&lt;TD&gt;100&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;07/01/2023&lt;/TD&gt;&lt;TD&gt;A&lt;/TD&gt;&lt;TD&gt;150&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;After updating dtA, the table should look like this&lt;/P&gt;&lt;TABLE border="1"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;Date&amp;nbsp;&lt;/TD&gt;&lt;TD&gt;Model&lt;/TD&gt;&lt;TD&gt;Qty&lt;/TD&gt;&lt;TD&gt;Ref&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;06/24/2023&lt;/TD&gt;&lt;TD&gt;A&lt;/TD&gt;&lt;TD&gt;23&lt;/TD&gt;&lt;TD&gt;100&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;06/30/2023&lt;/TD&gt;&lt;TD&gt;A&lt;/TD&gt;&lt;TD&gt;25&lt;/TD&gt;&lt;TD&gt;100&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;07/01/2023&lt;/TD&gt;&lt;TD&gt;A&lt;/TD&gt;&lt;TD&gt;34&lt;/TD&gt;&lt;TD&gt;150&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;07/05/2023&lt;/TD&gt;&lt;TD&gt;A&lt;/TD&gt;&lt;TD&gt;50&lt;/TD&gt;&lt;TD&gt;&amp;nbsp;&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Is this possible? Please help&lt;/P&gt;</description>
      <pubDate>Fri, 29 Sep 2023 02:02:06 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Update-table-according-to-the-date-less-than-or-equal-to-the/m-p/682139#M86777</guid>
      <dc:creator>UserID16644</dc:creator>
      <dc:date>2023-09-29T02:02:06Z</dc:date>
    </item>
    <item>
      <title>Re: Update table according to the date less than or equal to the reference file</title>
      <link>https://community.jmp.com/t5/Discussions/Update-table-according-to-the-date-less-than-or-equal-to-the/m-p/682167#M86778</link>
      <description>&lt;P&gt;Here is a script that works.&amp;nbsp; It will not be very efficient if the tables bet real large.&lt;/P&gt;
&lt;P&gt;Given your 2 data tables the script will provide the update&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="txnelson_0-1695961483960.png" style="width: 400px;"&gt;&lt;img src="https://community.jmp.com/t5/image/serverpage/image-id/57085iECA728728693FD20/image-size/medium?v=v2&amp;amp;px=400" role="button" title="txnelson_0-1695961483960.png" alt="txnelson_0-1695961483960.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;Please note that row 4 has an update value, where your table did not have one.&amp;nbsp; Unless I am misinterpreting your requirement, the last row has a value in the reference table that meets te selection criteria&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;Names Default To Here( 1 );

New Table( "Original",
	Add Rows( 4 ),
	New Column( "Date",
		Format( "m/d/y", 10 ),
		Input Format( "m/d/y" ),
		Set Values( [3770409600, 3770928000, 3771014400, 3771360000] )
	),
	New Column( "Model", Character( 16 ), Set Values( {"A", "A", "A", "A"} ) ),
	New Column( "Qty", Set Values( [23, 25, 34, 50] ) )
);
New Table( "Reference",
	Add Rows( 2 ),
	New Column( "Date",
		Numeric,
		"Continuous",
		Format( "m/d/y", 10 ),
		Input Format( "m/d/y" ),
		Set Values( [3768422400, 3771014400] )
	),
	New Column( "Model", Character( 16 ), Set Values( {"A", "A"} ) ),
	New Column( "Ref", Set Values( [100, 150] ) )
);


// This is the code that does the actual update
dtA = Data Table( "Original" );
dtB = Data Table( "Reference" );

dtA &amp;lt;&amp;lt; New Column( "Ref" );

For Each( {row}, Index( 1, N Rows( dtA ) ),
	dtA:Ref[row] = dtB:ref[Max(
		dtB &amp;lt;&amp;lt; get rows where( dtB:date &amp;lt;= dtA:date[row] )
	)]
);&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Fri, 29 Sep 2023 04:28:36 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Update-table-according-to-the-date-less-than-or-equal-to-the/m-p/682167#M86778</guid>
      <dc:creator>txnelson</dc:creator>
      <dc:date>2023-09-29T04:28:36Z</dc:date>
    </item>
    <item>
      <title>Re: Update table according to the date less than or equal to the reference file</title>
      <link>https://community.jmp.com/t5/Discussions/Update-table-according-to-the-date-less-than-or-equal-to-the/m-p/682180#M86780</link>
      <description>&lt;P&gt;There are few different methods of doing this, but JMP doesn't (at least yet) offer such a join directly.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;First you can create Ref to your original table (which will be empty) (this step is most likely unnecessary as JMP will add missing columns when concatenating)&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="jthi_0-1695965556973.png" style="width: 400px;"&gt;&lt;img src="https://community.jmp.com/t5/image/serverpage/image-id/57086i1EEA8016551AF7E7/image-size/medium?v=v2&amp;amp;px=400" role="button" title="jthi_0-1695965556973.png" alt="jthi_0-1695965556973.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;Concatenate the tables&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="jthi_1-1695965577506.png" style="width: 400px;"&gt;&lt;img src="https://community.jmp.com/t5/image/serverpage/image-id/57087i6A1B4CFB9D5F3494/image-size/medium?v=v2&amp;amp;px=400" role="button" title="jthi_1-1695965577506.png" alt="jthi_1-1695965577506.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;Sort by groups and time. Select all the values in Ref column and right click to select Fill missing&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="jthi_2-1695965644215.png" style="width: 400px;"&gt;&lt;img src="https://community.jmp.com/t5/image/serverpage/image-id/57088i1630F64C16CB6F2D/image-size/medium?v=v2&amp;amp;px=400" role="button" title="jthi_2-1695965644215.png" alt="jthi_2-1695965644215.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;Select all rows which have QTY missing and delete those&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="jthi_3-1695965669190.png" style="width: 400px;"&gt;&lt;img src="https://community.jmp.com/t5/image/serverpage/image-id/57089iB31D97CD87D58E5D/image-size/medium?v=v2&amp;amp;px=400" role="button" title="jthi_3-1695965669190.png" alt="jthi_3-1695965669190.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="jthi_4-1695965680563.png" style="width: 400px;"&gt;&lt;img src="https://community.jmp.com/t5/image/serverpage/image-id/57090i96A9D82076150049/image-size/medium?v=v2&amp;amp;px=400" role="button" title="jthi_4-1695965680563.png" alt="jthi_4-1695965680563.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;There are also some addins (and scripts) that can do this join in community. Also you can use SQL within JMP&lt;/P&gt;</description>
      <pubDate>Fri, 29 Sep 2023 05:38:06 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Update-table-according-to-the-date-less-than-or-equal-to-the/m-p/682180#M86780</guid>
      <dc:creator>jthi</dc:creator>
      <dc:date>2023-09-29T05:38:06Z</dc:date>
    </item>
    <item>
      <title>Re: Update table according to the date less than or equal to the reference file</title>
      <link>https://community.jmp.com/t5/Discussions/Update-table-according-to-the-date-less-than-or-equal-to-the/m-p/682183#M86782</link>
      <description>&lt;P&gt;Hi txnelson, it is prompting an error like this.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="UserID16644_0-1695969793610.png" style="width: 400px;"&gt;&lt;img src="https://community.jmp.com/t5/image/serverpage/image-id/57091iC6A7F34F95E59344/image-size/medium?v=v2&amp;amp;px=400" role="button" title="UserID16644_0-1695969793610.png" alt="UserID16644_0-1695969793610.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 29 Sep 2023 06:52:01 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Update-table-according-to-the-date-less-than-or-equal-to-the/m-p/682183#M86782</guid>
      <dc:creator>UserID16644</dc:creator>
      <dc:date>2023-09-29T06:52:01Z</dc:date>
    </item>
    <item>
      <title>Re: Update table according to the date less than or equal to the reference file</title>
      <link>https://community.jmp.com/t5/Discussions/Update-table-according-to-the-date-less-than-or-equal-to-the/m-p/682466#M86801</link>
      <description>&lt;P&gt;You are most likely running older JMP version than 16 (For Each was added in JMP16). You can fairly easily modify it and change it into For loop&lt;/P&gt;</description>
      <pubDate>Fri, 29 Sep 2023 17:31:29 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Update-table-according-to-the-date-less-than-or-equal-to-the/m-p/682466#M86801</guid>
      <dc:creator>jthi</dc:creator>
      <dc:date>2023-09-29T17:31:29Z</dc:date>
    </item>
    <item>
      <title>Re: Update table according to the date less than or equal to the reference file</title>
      <link>https://community.jmp.com/t5/Discussions/Update-table-according-to-the-date-less-than-or-equal-to-the/m-p/682470#M86802</link>
      <description>&lt;P&gt;I suspect that you have a version of JMP that does not support&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;For Each()&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;so if you change the For Each section to&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;For(row=1, row&amp;lt;= N Rows( dtA ), row++,
	dtA:Ref[row] = dtB:ref[Max(
		dtB &amp;lt;&amp;lt; get rows where( dtB:date &amp;lt;= dtA:date[row] )
	)]
);&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;it should work.&lt;/P&gt;</description>
      <pubDate>Fri, 29 Sep 2023 17:42:56 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Update-table-according-to-the-date-less-than-or-equal-to-the/m-p/682470#M86802</guid>
      <dc:creator>txnelson</dc:creator>
      <dc:date>2023-09-29T17:42:56Z</dc:date>
    </item>
    <item>
      <title>Re: Update table according to the date less than or equal to the reference file</title>
      <link>https://community.jmp.com/t5/Discussions/Update-table-according-to-the-date-less-than-or-equal-to-the/m-p/682838#M86841</link>
      <description>&lt;P&gt;Script is working fine now, but I have one last question, is there a way to limit the update to a certain date since the tables will be updated everyday? For example,&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Table dtA&lt;/P&gt;&lt;TABLE border="1"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;Date&amp;nbsp;&lt;/TD&gt;&lt;TD&gt;Model&lt;/TD&gt;&lt;TD&gt;Qty&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;06/24/2023&lt;/TD&gt;&lt;TD&gt;A&lt;/TD&gt;&lt;TD&gt;23&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;06/30/2023&lt;/TD&gt;&lt;TD&gt;A&lt;/TD&gt;&lt;TD&gt;25&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;07/01/2023&lt;/TD&gt;&lt;TD&gt;A&lt;/TD&gt;&lt;TD&gt;34&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;07/05/2023&lt;/TD&gt;&lt;TD&gt;A&lt;/TD&gt;&lt;TD&gt;50&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;07/10/2023&lt;/TD&gt;&lt;TD&gt;A&lt;/TD&gt;&lt;TD&gt;65&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;07/27/2023&lt;/TD&gt;&lt;TD&gt;A&lt;/TD&gt;&lt;TD&gt;68&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Table dtB&lt;/P&gt;&lt;TABLE border="1"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;Date&amp;nbsp;&lt;/TD&gt;&lt;TD&gt;Model&lt;/TD&gt;&lt;TD&gt;Ref&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;06/01/2023&lt;/TD&gt;&lt;TD&gt;A&lt;/TD&gt;&lt;TD&gt;100&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;07/01/2023&lt;/TD&gt;&lt;TD&gt;A&lt;/TD&gt;&lt;TD&gt;150&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;07/20/2023&lt;/TD&gt;&lt;TD&gt;A&lt;/TD&gt;&lt;TD&gt;300&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;08/01/2023&lt;/TD&gt;&lt;TD&gt;A&lt;/TD&gt;&lt;TD&gt;250&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;After updating dtA, the table should look like this&lt;/P&gt;&lt;TABLE border="1"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;Date&amp;nbsp;&lt;/TD&gt;&lt;TD&gt;Model&lt;/TD&gt;&lt;TD&gt;Qty&lt;/TD&gt;&lt;TD&gt;Ref&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;06/24/2023&lt;/TD&gt;&lt;TD&gt;A&lt;/TD&gt;&lt;TD&gt;23&lt;/TD&gt;&lt;TD&gt;100&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;06/30/2023&lt;/TD&gt;&lt;TD&gt;A&lt;/TD&gt;&lt;TD&gt;25&lt;/TD&gt;&lt;TD&gt;100&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;07/01/2023&lt;/TD&gt;&lt;TD&gt;A&lt;/TD&gt;&lt;TD&gt;34&lt;/TD&gt;&lt;TD&gt;150&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;07/05/2023&lt;/TD&gt;&lt;TD&gt;A&lt;/TD&gt;&lt;TD&gt;50&lt;/TD&gt;&lt;TD&gt;300&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;07/10/2023&lt;/TD&gt;&lt;TD&gt;A&lt;/TD&gt;&lt;TD&gt;65&lt;/TD&gt;&lt;TD&gt;300&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;07/27/2023&lt;/TD&gt;&lt;TD&gt;A&lt;/TD&gt;&lt;TD&gt;65&lt;/TD&gt;&lt;TD&gt;250&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I tried using the script, but it overwrites the past dates Ref value with the newest one which is 250. It looks like this&lt;/P&gt;&lt;TABLE border="1"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;Date&amp;nbsp;&lt;/TD&gt;&lt;TD&gt;Model&lt;/TD&gt;&lt;TD&gt;Qty&lt;/TD&gt;&lt;TD&gt;Ref&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;06/24/2023&lt;/TD&gt;&lt;TD&gt;A&lt;/TD&gt;&lt;TD&gt;23&lt;/TD&gt;&lt;TD&gt;250&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;06/30/2023&lt;/TD&gt;&lt;TD&gt;A&lt;/TD&gt;&lt;TD&gt;25&lt;/TD&gt;&lt;TD&gt;250&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;07/01/2023&lt;/TD&gt;&lt;TD&gt;A&lt;/TD&gt;&lt;TD&gt;34&lt;/TD&gt;&lt;TD&gt;250&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;07/05/2023&lt;/TD&gt;&lt;TD&gt;A&lt;/TD&gt;&lt;TD&gt;50&lt;/TD&gt;&lt;TD&gt;250&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;07/10/2023&lt;/TD&gt;&lt;TD&gt;A&lt;/TD&gt;&lt;TD&gt;65&lt;/TD&gt;&lt;TD&gt;250&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;07/27/2023&lt;/TD&gt;&lt;TD&gt;A&lt;/TD&gt;&lt;TD&gt;65&lt;/TD&gt;&lt;TD&gt;250&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;</description>
      <pubDate>Mon, 02 Oct 2023 00:21:38 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Update-table-according-to-the-date-less-than-or-equal-to-the/m-p/682838#M86841</guid>
      <dc:creator>UserID16644</dc:creator>
      <dc:date>2023-10-02T00:21:38Z</dc:date>
    </item>
    <item>
      <title>Re: Update table according to the date less than or equal to the reference file</title>
      <link>https://community.jmp.com/t5/Discussions/Update-table-according-to-the-date-less-than-or-equal-to-the/m-p/682857#M86846</link>
      <description>&lt;P&gt;The purpose of the Discussion Community with regard to help with scripts, , is not to be an on demand script generation source.&amp;nbsp; It is here to help individual get past issues with scripts they are developing, and to increase their ability to enhance their own scripts.&amp;nbsp;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If you have not taken the time to read the Scripting Guide, I strongly suggest that you do that.&amp;nbsp; It will show you the details of the scripting language and you will see from that, that JSL is a full scripting language that can handle virtually anything you can throw at it.&amp;nbsp; However, concerning your current question, you can easily place conditional "IF()" statements to define when the update should be executed or not executed.&amp;nbsp; Below is an illustration of such&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;For( row = 1, row &amp;lt;= N Rows( dtA ), row++,
	If( dtb:Date == Today(),
		If( dtA:date[row] &amp;lt;= Col Max( dtB:date ),
			dtA:Ref[row] = dtB:ref[Max(
				dtB &amp;lt;&amp;lt; get rows where( dtB:date &amp;lt;= dtA:date[row] )
			)],
			dtA:Ref[row] = .
		)
	)
);&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Mon, 02 Oct 2023 02:51:40 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Update-table-according-to-the-date-less-than-or-equal-to-the/m-p/682857#M86846</guid>
      <dc:creator>txnelson</dc:creator>
      <dc:date>2023-10-02T02:51:40Z</dc:date>
    </item>
  </channel>
</rss>

