<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="http://forums.method.me/cs/utility/FeedStylesheets/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/"><channel><title>Method:Classic General Q&amp;amp;A</title><link>http://forums.method.me/cs/forums/13.aspx</link><description>Ask technical support questions, how do I? Questions... Or anything else you want to know from the Method Team and other Method users.</description><dc:language>en</dc:language><generator>CommunityServer 2007.1 SP2 (Build: 31113.47)</generator><item><title>Re: Help with looping through a table</title><link>http://forums.method.me/cs/forums/thread/18732.aspx</link><pubDate>Wed, 28 Aug 2013 18:08:31 GMT</pubDate><guid isPermaLink="false">3393c1ec-311b-4812-96cb-ad8c611bba4f:18732</guid><dc:creator>Method_Adam</dc:creator><slash:comments>0</slash:comments><comments>http://forums.method.me/cs/forums/thread/18732.aspx</comments><wfw:commentRss>http://forums.method.me/cs/forums/commentrss.aspx?SectionID=13&amp;PostID=18732</wfw:commentRss><description>&lt;p&gt;&lt;span id="mce_0_start" style="overflow:hidden;"&gt;Hi Karen,&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span id="mce_0_start" style="overflow:hidden;"&gt;&lt;/span&gt;Sorry for the delay. &amp;nbsp;I actually ran into the same issue you had with the date range. There is however an easy fix for this. &amp;nbsp;Instead of using a &amp;quot;value from screen&amp;quot;, I would first assign t&lt;span id="mce_1_start" style="overflow:hidden;"&gt;&lt;/span&gt;&lt;span id="mce_2_start" style="overflow:hidden;"&gt;he&lt;/span&gt;&amp;nbsp;&lt;span id="mce_4_start" style="overflow:hidden;"&gt;date&amp;nbsp;&lt;/span&gt;values to Action Result&lt;span id="mce_5_start" style="overflow:hidden;"&gt;s&lt;/span&gt; and then use those action results in the Where clause.&lt;span id="mce_6_start" style="overflow:hidden;"&gt; &amp;nbsp;I will create a ticket for this, as you should be able to use the values directly from the screen.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="overflow:hidden;"&gt;Can you tell me a bit more about the second issue?&lt;span id="mce_8_start" style="overflow:hidden;"&gt;&lt;/span&gt;&amp;nbsp;&lt;span id="mce_9_start" style="overflow:hidden;"&gt;I notice off the bat that action #3 might be a bit off. &amp;nbsp;You are updating based on &amp;quot;value from row = RecordID&amp;quot;. &amp;nbsp;If you are looping through the Invoice table, the recordID is the Invoice RecordID, not the customer. &amp;nbsp;Could this be the source of the issue.&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="overflow:hidden;"&gt;&lt;span style="overflow:hidden;"&gt;- Adam&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;</description></item><item><title>Help with looping through a table</title><link>http://forums.method.me/cs/forums/thread/18703.aspx</link><pubDate>Tue, 27 Aug 2013 14:05:34 GMT</pubDate><guid isPermaLink="false">3393c1ec-311b-4812-96cb-ad8c611bba4f:18703</guid><dc:creator>kdellaripa</dc:creator><slash:comments>0</slash:comments><comments>http://forums.method.me/cs/forums/thread/18703.aspx</comments><wfw:commentRss>http://forums.method.me/cs/forums/commentrss.aspx?SectionID=13&amp;PostID=18703</wfw:commentRss><description>&lt;p&gt;&lt;span id="mce_0_start" style="overflow:hidden;"&gt;What I am trying to do is &lt;span id="mce_3_start" style="overflow:hidden;"&gt;sum&lt;/span&gt;&amp;nbsp;the amounts from invoices within a date range and enter them in a new field in the customer table called &amp;quot;aaSumofInvoices&amp;quot;. &amp;nbsp;This is what I have do&lt;span id="mce_16_start" style="overflow:hidden;"&gt;&lt;/span&gt;ne so far and the errors associated with them.&lt;span id="mce_6_start" style="overflow:hidden;"&gt; &amp;nbsp;&lt;span id="mce_8_start" style="overflow:hidden;"&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span id="mce_4_start" style="overflow:hidden;"&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;I added a field in the customer table called &amp;ldquo;aaSumofInvoices&amp;rdquo;.&lt;/p&gt;
&lt;p&gt;&lt;span style="overflow:hidden;"&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;span id="mce_9_start" style="overflow:hidden;"&gt;&lt;/span&gt;On one of my test screens I added two date picker fields, one called &amp;ldquo;From&amp;rdquo; and one called &amp;ldquo;To&amp;rdquo;.&amp;nbsp; Then I added a button.&amp;nbsp; Under the button actions I did a simple loop through table:&lt;/p&gt;
&lt;p&gt;&lt;span style="overflow:hidden;"&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 1&amp;nbsp; Start Loop through Invoice table where RecordID &lt;span id="mce_17_start" style="overflow:hidden;"&gt;greater than&lt;/span&gt;&amp;nbsp;Type In 0, and Where TxnDate Greater than or equal to Value From Screen &amp;ldquo;From&amp;rdquo; and where TxnDate Less than or equal to Value from Screen &amp;ldquo;To&amp;rdquo;.&lt;/p&gt;
&lt;p&gt;&lt;span style="overflow:hidden;"&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 2&amp;nbsp; Retrieve Value From Invoice Table From Amount Field where Field = Customer_RecordID, value is: Value From Row Customer_RecordID, If multiple results Retrieve Sum and Place Value in Action Result &amp;ldquo;SumofInvoices&amp;rdquo;&lt;/p&gt;
&lt;p&gt;&lt;span style="overflow:hidden;"&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 3&amp;nbsp; Update &amp;ldquo;aaSumofinvoices&amp;rdquo; Field In Customer Table, Value from Action Result &amp;ldquo;SumofInvoices&amp;rdquo; where Record ID = Value from Row Record ID.&lt;/p&gt;
&lt;p&gt;&lt;span style="overflow:hidden;"&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 4&amp;nbsp; End Loop Through Table.&lt;/p&gt;
&lt;p&gt;&lt;span style="overflow:hidden;"&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;span style="overflow:hidden;"&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;When I try and run exactly as above I get error message &amp;ldquo;Action Sequence:1&amp;nbsp; The field for (Value From Screen) was not found.&amp;nbsp; Please verify your actions and republish this page&amp;rdquo;.&amp;nbsp; I&amp;rsquo;m not understanding this message.&amp;nbsp; I have picked dates in the From &amp;amp; To fields &amp;ndash; once I pick dates doesn&amp;rsquo;t that put those values in those fields?&lt;/p&gt;
&lt;p&gt;&lt;span style="overflow:hidden;"&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;span style="overflow:hidden;"&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;So then I took out the date filters in action 1 to see if I could at least get it to run for all dates.&amp;nbsp; When I do that, I get the error message &amp;ldquo;Error:One or more fields referenced by your actions were not found on the screen.&amp;nbsp; Please make sure all actions specify a valid object on the screen and republish&amp;rdquo;.&amp;nbsp; I don&amp;rsquo;t understand this error either as I&amp;rsquo;m looping through a table and placing result in another table.&amp;nbsp; What I ultimately want to do is have this sequence run as part of running a report, so it would be an action after clicking the report button, which would not be on the same screen as the tables either.&lt;/p&gt;
&lt;p&gt;&lt;span style="overflow:hidden;"&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span id="mce_14_start" style="overflow:hidden;"&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span id="mce_14_start" style="overflow:hidden;"&gt;&lt;/span&gt;Right now I am just testing the logic of doing this for one table, but ultimately I &lt;span id="mce_13_start" style="overflow:hidden;"&gt;need&lt;/span&gt;&amp;nbsp;to do this in a button that will generate a report, but I need to sum amounts from 3 different tables first and then use the amounts in my report. &amp;nbsp;Do I need to have all three tables on the screen where my button is?&lt;span id="mce_8_end"&gt;&lt;/span&gt;&amp;nbsp;&lt;span id="mce_10_start" style="overflow:hidden;"&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="overflow:hidden;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="overflow:hidden;"&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;Any help you can offer would be so appreciated.&lt;span id="mce_5_start" style="overflow:hidden;"&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="overflow:hidden;"&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;span style="overflow:hidden;"&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;Thanks!!!&lt;/p&gt;
&lt;p&gt;&lt;span id="mce_1_start" style="overflow:hidden;"&gt;&lt;/span&gt;Karen&lt;/p&gt;
&lt;p&gt;&lt;span id="mce_18_start" style="overflow:hidden;"&gt;&lt;/span&gt;&lt;/p&gt;</description></item></channel></rss>