in a forms onShow method I have:
foundset.clearFoundSet();
controller.find();
shipto_customer = globals.ShipToNumber;
controller.search();
The purpose is to limit the view to only the records for this customer. The main table has almost 1 million records and the form seems to read all the records then it processes my query. How can I eliminate the default query that seems to run when a form is loaded.
thanks
bruce
Hi Bruce
Without further info I would probably set up a Global relationship gShipToNumber → shipto_customer then display records through that relationship by placing the form as a Tab Panel.
Hope this makes sense
Graham Greensall
Worxinfo Ltd
To not have an initial foundset on a form set the form property onShowAllRecordsCmd to None.
Additionally you can also contemplate to use the addFoundSetFilterParam (on the controller of the form in Methods) or the addTableFilterParam (on Databasmanager in Methods) to constrain the foundsets for the whole session.