HOW TO: return to previous foundset if searchResult =0

Find out how to get things done with Servoy. Post how YOU get things done with Servoy

HOW TO: return to previous foundset if searchResult =0

Postby maarten » Thu Nov 13, 2003 3:44 pm

var dupFoundset = controller.duplicateFoundSet(); //copiesyour currentFoundset into a variable
controller.find();
//do search
if(!controller.search() ) // performs the search AND checks if result is empty
{
plugins.dialogs.showDialog('Alert','No searchResults','OK')
controller.loadRecords(dupFoundset)//restores your prev set.
}
Maarten Berkenbosch
User avatar
maarten
 
Posts: 797
Joined: Wed Apr 23, 2003 10:52 pm
Location: Amersfoort, Netherlands

Postby IT2Be » Thu Nov 13, 2003 8:48 pm

thanks maarten...
Marcel J.G. Trapman (IT2BE)
SAN partner - Freelance Java and Servoy
Servoy Components - IT2BE Plug-ins and Beans for Servoy
ServoyForge - Open Source Components for Servoy
User avatar
IT2Be
Servoy Expert
 
Posts: 4766
Joined: Tue Oct 14, 2003 7:09 pm
Location: Germany

Saving Found Sets?

Postby chris » Wed Dec 31, 2003 8:40 pm

Can I use the var dupFoundset = controller.duplicateFoundSet(); to save a found set by creating a separate table and storing the variable there for each found set? Also, is there a limit to the number of records in the found set that can be saved, e.g., can I save 100,000 records?

FYI - I'm coming from FM in which we copy all records and store the results in a field in a separate table (of course observing the 62K limit)

Thanks!
chris
 
Posts: 82
Joined: Wed Dec 31, 2003 8:24 pm


Return to How To

Who is online

Users browsing this forum: No registered users and 2 guests