Dear all
I have a weird problem with a solution that otherwise works well…
I have a contacts table, which contains clients and suppliers.
Suppliers are flagged with a suppliers_list column set to ‘yes’, so far so good…
In a sales form - based on the sales table, I have a relation to line items. line_items store sales_id (a fk in line items), contacts_id (another fk in line items) (for the client whose line item it is), and a supplier name. The supplier name is a typeahead based on a valuelist which is set by a global relation from a global with a default value of ‘yes’, to contacts where suppliers_list is ‘yes’. This works fine and gives me a type ahead field that I can choose contacts who are suppliers. The relation shows the supplier name (field is called company) but returns to the database the suppliers contacts_id. Still so far so good and all works…
The problem is that occasionally (2 or 3 times a day), some unknown process sets the lookup company name in the contacts table to the supplier id. The result of this is that every day we need to go through the contacts list to find any records with numbers instead of company name, and change it back to the company name. There are no ondatachange methods in the relevant fields in line_items, nor on
I do not have any incidence of ‘company =’ or ‘company=’ in any method or calc that I can find. There is nothing that I can find which works through any of my 3 line_items_to_contacts relations in the other direction (in other words, its only for looking up the company name). I have added a databaseManager.saveData() to the ondatachange on the supplier name (which is actually the supplier’s contact_id (as a fk in the line items table), but the name in the list). I don’t see though how that could really help, i’m just pulling at straws.
I really have no clue as to what is causing this. I also am unable to reproduce the problem locally. My own server, running with a copy of their databases, and precisely the same configuration seems to work fine, however it really doesn’t appear to be a rare problem, and I may just not have changed data enough times.
I can’t see this being user error, as they would have to go to the contacts table, find the supplier and change it to the contacts id. Too convoluted, and the error is clearly related to my relationship from line items to contacts to pick up the company name (and it is the company name that is being set to the id)
Attached are screenshots of my three relations from line items to contacts (including the one global one). I can’t see anything wrong with them… Perhaps some fresh eyes will… I can’t add the 4th because only three attachments… grr.
Be grateful for any thoughts or ideas on this…
Thanks
Bevil
ps, Mac OS X 10.5.6, Java 1.6, Servoy 4.1 all latest everything…


