I’m actually using Developer but this seems like a “how to use Client” question:
If one presses Cmd “F” (I’m on Mac) to enter Find mode, and one simply wishes to cancel and go back to Browse mode, how is this done? I’ve tried Cmd-. (“cancel” on a Mac), Cmd-B (for “Browse”), Esc, and also tried pressing Cmd-F again figuring it might work like a “toggle combo” (like Cmd-L for going into Designer and then same keystroke for exitng Designer).
I’m sure the answer must be staring me in the face, Servoy seems too good a product to require one to enter a dummy Find (and thereby lose one’s previous found set) as the only way to get out of Find mode …
press F3, and you still lose the found set ( you find all )
is there any control here?
e.g. if none found, and you answer “no” to “modify find”, I would like to either find none, or return to the original found set
Didn’t test it, but what about a method that duplicates the foundset and set the solution to reload it under certain conditions (attached to OnSearch property, for instance)? This way, you should be able to go back to previous state.
I think the best way to handle this issue is to save de sql and the parameters which did get your foundset, save also the index so you return to the same record. Here you have the two methods.
The first one to save it before you enter the find mode and the second one to restore it after you did a find.
to save
/******************************************
Purpose: to save a foundset in when entering a find and the user wants to cancel
******************************************/
globals.svy_sea_foundset = new Object()
globals.svy_sea_foundset.form = 'customers'
// save the sql and parameters
globals.svy_sea_foundset.sql = databaseManager.getSQL(forms[globals.svy_sea_foundset.form].foundset)
globals.svy_sea_foundset.parameters = databaseManager.getSQLParameters(forms[globals.svy_sea_foundset.form].foundset)
// save the index
globals.svy_sea_foundset.index = forms[globals.svy_sea_foundset.form].controller.getSelectedIndex()
to restore
/******************************************
Purpose: to restore a saved foundset in case you enter a find and the user wants to cancel
Parameters: globals.svy_sea_foundset contains the form, sql, parameters and index
******************************************/
// 1 load all records
forms[globals.svy_sea_foundset.form].controller.loadAllRecords()
//2 load records on to form
forms[globals.svy_sea_foundset.form].controller.loadRecords(globals.svy_sea_foundset.sql,globals.svy_sea_foundset.parameters);
//3 set selected record.
forms[globals.svy_sea_foundset.form].controller.setSelectedIndex(globals.svy_sea_foundset.index)