I want to find out how many records in the find foundset but if I check
currentcontroller.getMaxRecordIndex()
it is always set to 1 untill the user moves to the second record in the find foundset and is then set to the right number. Is there a way I can get the right number immediately after the find is compleded?
but I think my problem is not in the syntax, but in the event.
What happens is I do
currentcontroller.find()
and then the user enters the find criteria in the form and presses enter. By doing that, they execute a currentcontroller.search()
It is after the currentcontroller.search() that I need to check for the number of records, but I have been checking after the currentcontroller.find(). That is why I keep getting one record.
The problem is I don’t know how to capture the event that fires after a user presses enter in find mode. I have tried using the onFindCmd event but that doesn’t do it.
The user presses a button and the form is placed in find mode. They they enter their search criteria into the form and press the enter key. That causes the find to do the search.
There MUST be some kind of event that fires when this occurs… isn’t there?
Starting the search is not the problem. I am using the onAction event of a button for that. The problem is finding something that fires after the user presses enter to finish the find operation.
Anyway, it seems the onRecordSelection event fires, so I can attach my code to that.
there is no event “after search”
we are planning to give an event: onSearch() that is right before we call search. So that you can alter the search and then do the real search.
But normally you can’t execute methods when in find mode. So we have this under investigation.