This is baffling to me - hopefully someone can shed some light on it…
I am trying to do a find on a form that is setup to print mailing labels (Avery standard - 30/page - everything is setup properly and prints fine). The ‘addresses’ table used by this form is also used by another form in Record view.
When I do a find on either form using this table (since they share a foundset) and “simple” search criteria (e.g. address_id < 200 or state = ‘FL’), I get an appropriate number of records - sometimes 200 records (to start with, but really more than that) if the criteria is broad enough. As far as I am concerned, this appears to be functioning properly.
However, when I do a find with more complicated criteria, things get weird. Actually, it is just one set of criteria that is vital to the system: a bunch of specific address_id’s (primary keys of the ‘addresses’ table). For instance, if I have a list of 140 addresses to print, I put the form into Find mode, then create 140 records on the form with each of the primary keys that I want to print, then search. Here’s the problem: the resulting foundset from the search is always limited to 60 records when I do it this way!
I don’t know if this is related to the fact that 60 records is two pages of labels, or if that’s just a coincidence. And it happens whether I search on the labels form, or on the other form that uses the same table but is not setup to print labels. I should also mention that the 60 records that are selected are always the LAST 60 primary keys of the search.
I have checked my loops and everything else that goes into executing this search. All is correct. I even wrote a simple loop to select primary keys 1-100 in this fashion (find, create 100 records, then search), and that also brought up only 60 records (primary keys 41-100). So, I am convinced it is something outside of my code that is causing this to happen, but I am clueless as to what else to check. If there was some sort of limit you could set on the number of records returned (and I don’t think there is in Servoy), then it wouldn’t return more than 60 records when using “simple” search criteria.
Also, before you ask: the primary keys are in a seprarate table on the N side of the relation. I can’t use a relation to select the records I need. This is the only way I’ve come up with, and it works well on other tables in other methods in the same solution (no odd record limits like I’m seeing here). If you have a better way to do this, though, I’m all ears.
Thanks, as always, for any help or insight you can provide