Displaying Found Count (Like FMP)
Posted: Fri Dec 24, 2004 3:55 pm
Merry Christmas to the 1,000,000 FileMaker Developers who have asked, begged and cajoled for an easy way to show the record count in Servoy.
I used globals.rec_display - but you can use any global you want. Make this code a global method and attach it to each form's "onShow" event. Also, make sure you call it after new record, delete record, show all records, duplicate record, omit record on EVERY form you use it on.
That means you'll need to hook up a method to all of the above commands (you can use a single global method to create records, delete records, etc using currentController) - as well as hook up a method for FIND on all your forms.
REMEMBER: Servoy isn't FileMaker!
ENJOY!
- Code: Select all
var x = "Record " + currentcontroller.getSelectedIndex() + " of " + currentcontroller.getMaxRecordIndex()
x += " (" + databaseManager.getFoundSetCount(forms[currentcontroller.getName()].foundset) + " in foundset)"
globals.rec_display = x
I used globals.rec_display - but you can use any global you want. Make this code a global method and attach it to each form's "onShow" event. Also, make sure you call it after new record, delete record, show all records, duplicate record, omit record on EVERY form you use it on.
That means you'll need to hook up a method to all of the above commands (you can use a single global method to create records, delete records, etc using currentController) - as well as hook up a method for FIND on all your forms.
REMEMBER: Servoy isn't FileMaker!
ENJOY!