﻿<?xml version="1.0" encoding="UTF-8"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/"><channel><title>StrataFrame Forum » StrataFrame Application Framework - V1 » Business Objects and Data Access (How do I?)  » BO-Count and number of records processed</title><generator>InstantForum 2017-1 Final</generator><description>StrataFrame Forum</description><link>http://forum.strataframe.net/</link><webMaster>StrataFrame Forum</webMaster><lastBuildDate>Sat, 30 May 2026 03:41:34 GMT</lastBuildDate><ttl>20</ttl><item><title>BO-Count and number of records processed</title><link>http://forum.strataframe.net/FindPost32174.aspx</link><description>Hi there,&lt;br/&gt;&lt;br/&gt;in a form I send data to wholesalers and have a property to check if the upload has worked. I call a sub-routine to process the data:&lt;br/&gt;&lt;br/&gt;[code]&lt;br/&gt;&lt;br/&gt;Private sub copydata(lSendenok as boolean)&lt;br/&gt;&lt;br/&gt;&lt;font face=Consolas&gt;BestBO1.Filter = &lt;/font&gt;&lt;font color=#a31515 face=Consolas&gt;&lt;font color=#a31515 face=Consolas&gt;"status = 'L'"&lt;br/&gt;&lt;br/&gt;&lt;/font&gt;&lt;/font&gt;&lt;font face=Consolas&gt;BestBO1.MoveFirst()&lt;br/&gt;&lt;br/&gt;&lt;/font&gt;&lt;font color=#0000ff face=Consolas&gt;&lt;font color=#0000ff face=Consolas&gt;If&lt;/font&gt;&lt;/font&gt;&lt;font face=Consolas&gt; lSendenOk &lt;/font&gt;&lt;font color=#0000ff face=Consolas&gt;&lt;font color=#0000ff face=Consolas&gt;Then&lt;/font&gt;&lt;/font&gt;&lt;br/&gt;&lt;br/&gt;&lt;font color=#0000ff face=Consolas&gt;&lt;font color=#0000ff face=Consolas&gt;&amp;nbsp; ... Not yet tested&lt;br/&gt;&lt;br/&gt;&lt;/font&gt;&lt;/font&gt;Else&lt;br/&gt;&lt;br/&gt;&lt;font face=Consolas&gt;&lt;/font&gt;&lt;font color=#0000ff face=Consolas&gt;&lt;font color=#0000ff face=Consolas&gt;&amp;nbsp; &amp;nbsp;Dim&lt;/font&gt;&lt;/font&gt;&lt;font face=Consolas&gt; nCount &lt;/font&gt;&lt;font color=#0000ff face=Consolas&gt;&lt;font color=#0000ff face=Consolas&gt;As&lt;/font&gt;&lt;/font&gt;&lt;font face=Consolas&gt; &lt;/font&gt;&lt;font color=#0000ff face=Consolas&gt;&lt;font color=#0000ff face=Consolas&gt;Integer&lt;/font&gt;&lt;/font&gt;&lt;font face=Consolas&gt; = 0 ' For testing&lt;br/&gt;&lt;br/&gt;&lt;/font&gt;&lt;font color=#0000ff face=Consolas&gt;&lt;font color=#0000ff face=Consolas&gt;&amp;nbsp;&amp;nbsp; Do&lt;br/&gt;&lt;br/&gt;&lt;/font&gt;&lt;/font&gt;&lt;font face=Consolas&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; BestBO1.STATUS = &lt;/font&gt;&lt;font color=#a31515 face=Consolas&gt;&lt;font color=#a31515 face=Consolas&gt;"W"&lt;br/&gt;&lt;br/&gt;&lt;/font&gt;&lt;/font&gt;&lt;font face=Consolas&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp; nCount = nCount + 1&amp;nbsp; ' For testing&lt;br/&gt;&lt;br/&gt;&lt;/font&gt;&lt;font color=#0000ff face=Consolas&gt;&lt;font color=#0000ff face=Consolas&gt;&amp;nbsp;&amp;nbsp; Loop&lt;/font&gt;&lt;/font&gt;&lt;font face=Consolas&gt; &lt;/font&gt;&lt;font color=#0000ff face=Consolas&gt;&lt;font color=#0000ff face=Consolas&gt;While&lt;/font&gt;&lt;/font&gt;&lt;font face=Consolas&gt; BestBO1.MoveNext&lt;br/&gt;&lt;br/&gt;&amp;nbsp;&amp;nbsp; BestBO1.Save()&lt;br/&gt;&lt;br/&gt;&amp;nbsp;&amp;nbsp; MsgBox(nCount.ToString) ' For testing&lt;br/&gt;&lt;br/&gt;&lt;/font&gt;Endif&lt;br/&gt;&lt;br/&gt;[/code]&lt;br/&gt;&lt;br/&gt;At the beginning of the sub, after setting the filter-property, the bestbo1.count is 28 which are 28 records to be processed, but the Do-Loop runs only 14 times.&amp;nbsp; What may I have missed there?&lt;br/&gt;&lt;br/&gt;Thanks in Advance&lt;br/&gt;&lt;br/&gt;Thomas</description><pubDate>Tue, 06 Aug 2013 13:34:55 GMT</pubDate><dc:creator>Thomas Holste</dc:creator></item><item><title>RE: BO-Count and number of records processed</title><link>http://forum.strataframe.net/FindPost32176.aspx</link><description>Hi Ben,&lt;br/&gt;&lt;br/&gt;thanks a lot, now it works fine.&lt;br/&gt;&lt;br/&gt;Best regards&lt;br/&gt;&lt;br/&gt;Thomas</description><pubDate>Tue, 06 Aug 2013 13:34:55 GMT</pubDate><dc:creator>Thomas Holste</dc:creator></item><item><title>RE: BO-Count and number of records processed</title><link>http://forum.strataframe.net/FindPost32175.aspx</link><description>You're filtering down to only those records that have a status of 'L'. &amp;nbsp;When you set the status to 'W', it removes the item from the view, so moves to the next record. &amp;nbsp;Like this:&lt;br/&gt;&lt;br/&gt;&lt;div&gt;Record1 Status L &amp;lt;-- Current row&lt;div&gt;Record2 Status L&lt;div&gt;Record3 Status L&lt;div&gt;Record4 Status L&lt;br/&gt;&lt;br/&gt;&lt;div&gt;Start of loop sets Record1 to Status W, and it gets filtered out:&lt;br/&gt;&lt;br/&gt;&lt;div&gt;Record2 Status L &amp;lt;-- Current row&lt;div&gt;Record3 Status L&lt;div&gt;Record4 Status L&lt;br/&gt;&lt;br/&gt;&lt;div&gt;Calling move next then moves to record 3, essentially skipping Record2&lt;br/&gt;&lt;br/&gt;&lt;div&gt;&lt;div&gt;Record2 Status L&lt;div&gt;Record3 Status L&amp;nbsp;&amp;lt;-- Current row&lt;div&gt;Record4 Status L&lt;br/&gt;&lt;br/&gt;&lt;div&gt;So, each time you change the status, you're changing the record and moving your pointer to the next record by removing the item from the filtered objects. &amp;nbsp;If you change your loop to Do While BestBO1.Count &amp;gt; 0, then, as you set the status to 'W', they will be removed from the filter, and you'll be able to get to all 28 records.</description><pubDate>Tue, 06 Aug 2013 08:37:39 GMT</pubDate><dc:creator>StrataFrame Team</dc:creator></item></channel></rss>