First record in foundset loses related records in tab

Hi all

I have a very strange problem. I am with a client who have a Servoy solution which has worked fine for years. Recently, the first record in an addressbook form has lost its list of addresses in related form address_list (visible in a tabpanel). The parent record in addresses has a contact_id which is related to the contact_id child record in an address_list. When you open the solution, the first record had no related addresses (although there is a set of blank fields where the address should be - ordinarily when there is no related record, there are no fields visible). All subsequent parent records have related address data as normal

Search explicitly for this first record, and you see no address data.

View the address list in isolation and you can see all records (including the ones which are children of the main address record)

Delete the first record (making record 2 the first one) and record 2 loses its related address data

Onload there is a foundset filter, however if I turn this off, it behaves the same way

Precisely the same behaviour in Servoy Server and Servoy client

I’m stumped as to why the first parent record in a foundset visibly loses related data (although not really lost).

I’m running Servoy 3.5.7 with Java 1.6 and 1.5 on a Mac running OS X 10.5.5. Server (although this affects client running from the server as well as developer running locally on my machine).

Any ideas would be gratefully received.

Thanks

Bevil

As a followup, I have just opened a backup of the database from 15/04/08 and it works fine with this (also Servoy 3.5.7 - also Java 1.6 and also OS X 10.5.5) there are no obvious differences between the old version and the current one, and nothing has changed programatically

Bevil

Second followup:

I have done a relation relookup and get this error when I try to load the related record:

java.lang.NumberFormatException: For input string: “FoundSet[Table:addresses.Size: 10.CachedRecords: 2.SELECTED INDEX: 0]”
org.mozilla.javascript.JavaScriptException: java.lang.NumberFormatException: For input string: “FoundSet[Table:addresses.Size: 10.CachedRecords: 2.SELECTED INDEX: 0]”

Not sure what that means or where to take it from here…

There was another thread discussing the possibility that the column types might not match, that’s not the case here (both integer). They are also both running on the same server in the same database (Sybase 9).

Thanks for any help anyone can give…

Bevil

At first glance this seems like a corrupted data in the database. Can you check with an external database tool to see what value you have there ? It may be an invalid integer ( like a string or something).

Hi

I don’t think it can be data in the database because it behaves the same in my developer version (with my own entirely separate version of the database/tables).

I have just recreated the relation and the tabpanel and it behaves precisely the same…

Any other thoughts from anyone?

Strangely there are several other relation tabpanels in this form and from this table which all work fine.

I think the clue is in the error message I managed to get: FoundSet[Table:addresses.Size: 10.CachedRecords: 2.SELECTED INDEX: 0]"
org.mozilla.javascript.JavaScriptException: java.lang.NumberFormatException: For input string: “FoundSet[Table:addresses.Size: 10.CachedRecords: 2.SELECTED INDEX: 0]”

Although I don’t know what that means…

Nailed it…

There is a method to check whether the address type is filled. The first line of it was: if (controller.find()) { }
This was running (without a trigger that I can see), and was putting the controller into find mode…

Anyway, problem solved.