Page 1 of 1

Find/Search Results Capped at 200

PostPosted: Fri Jun 22, 2012 2:27 am
by kwpsd
Version: 6.0.6 - build 1232

A table has 1091 records. In this table, there are 971 records whose column named 'period' contain an empty string (''). The following find/search code is used to extract the 971 records (numbers verified using SQL Explorer):

Code: Select all
    var fs = databaseManager.getFoundSet( databaseName, tableName )
   
    if ( fs.find() )
    {
        fs.period = ''
       
        var recordCount = fs.search()
       
        <remainder of code>
    }


The variable 'recordCount' always returns a value of 200. Should it not be returning the number of records found (971)?

Any help or suggestions appreciated...thanks!

Re: Find/Search Results Capped at 200

PostPosted: Fri Jun 22, 2012 3:27 am
by ptalbot
As usual to know the exact number of records in the foundset, you need to use databaseManager.getFoundsetCount(fs);

Re: Find/Search Results Capped at 200

PostPosted: Fri Jun 22, 2012 4:22 am
by kwpsd
I tried that but was getting the full record count of 1091, so I thought something changed. Now, at home, after restarting my computer, I tried it again, and it worked. Some days...

Thanks for reiterating the .getFoundsetCount() yet one more time! <grin>

Re: Find/Search Results Capped at 200

PostPosted: Fri Jun 22, 2012 5:05 am
by ptalbot
Maybe you did a .getFoundsetCount() on the foundset before the search which is why it was returning the full count?
Anyway, glad it works for you now! :)

Re: Find/Search Results Capped at 200

PostPosted: Fri Jun 22, 2012 8:08 am
by m.vanklink
I would use this:

Code: Select all
fs.period = '^='

This will search for fields containing null or empty string

Re: Find/Search Results Capped at 200

PostPosted: Fri Jun 22, 2012 8:10 pm
by kwpsd
Patrick...your guess was close. I discovered that I had two expressions in the debugger; one for a variable based on the foundset count and one evaluating the getFoundsetCount() directly, and I was using the wrong one in my analysis.

Michel...thanks for the tip!