If I search now an existing record outside of the loaded foundset, I get no result. I have to set
forms[vForm].controller.loadAllRecords();
ahead the controller.find() for getting the correct result!
I thought controller.find()/controller.search() is working on all records in the table and not only in the loaded foundset?
if your foundset is a related foundset then a find/search on a related foundset will result in a search within that relation.
So you just have to look why you are mixing that form for different stuff. On one end you show related data in it (is it used in a tab?) and on the other end you want to use it as a (main) form with all the records?
jcompagner:
So you just have to look why you are mixing that form for different stuff. On one end you show related data in it (is it used in a tab?) and on the other end you want to use it as a (main) form with all the records?
The users change to the orders edit form in several ways. If they are in a customers form, they change to orders in a related foundset of the customer orders. Do users want to find an order outside of the foundset, controller.find()/controller.search() get no result as Johan discriped. But users are also in orders by an unrelated foundset. So find/search have to work in any possible szenarios.
I have modified my function and that is now working: