controller.clearFoundSet() ? uhm, that sounds good
The reason is that I want the users to find an empty foundset every time they enter this form from the main menu, it would be even better if I could call a controller.show() without having Servoy request all of the records.
make a method and attach on the onShow property of a form:
controller.find()
field1 = "abracadabraabracadabraacradabra"
controller.search()
if(controller.getMaxRecordIndex() > 0)
{
plugins.dialogs.showInfoDialog('WOW!', 'You are a hell of a lucky guy that you have typed this into your field! You have won the deepfreezer!! ','OK');
}
else
{
//you have an empty foundset!
}
r.rios:
The reason is that I want the users to find an empty foundset every time they enter this form from the main menu, it would be even better if I could call a controller.show() without having Servoy request all of the records.
Attach an empty method to onLoadAllRecordsCmd property to leave it empty by default.
do you really want the form to be empty every time a user goes to the form? Or just the first time it enters that form?
The first time works if you override the onShowAllRecordsCmd
But then you also must say that you want to use a separate foundset because if you don’t then if you have other forms that builds on that table and those forms are shown first you will see that data.
if you always want a empty foundset when the users shows the form then you have to this, make this method:
jcompagner:
do you really want the form to be empty every time a user goes to the form? Or just the first time it enters that form?
Every time a user enters the form from the main menu (specific form).
jcompagner:
But then you also must say that you want to use a separate foundset …
actually, I don’t. If I did then controller.loadRecords(null); would have been just fine and I believe is equivalent to your example below, but it creates a separate foundset for this form and I don’t want that.
OK then then the only solution is to have a clearFoundSet method..
That will make the shared foundset empty over all the forms that are build on that table.