ddreese Posted September 23, 2003 Posted September 23, 2003 I have a db_search file that has a few globals in it that you enter and it searches multiple files using those values. All of my other searches allow the users to press 'enter' after they type in the field, because they are in find mode of the current file (the one that they are searching). Since I'm in browse mode when I hit 'enter' in a field, it inserts a new line. I can't have it go into find mode, because it's not searching the 'db_search' file. I have it running the script that takes me to the search layout, and pauses it. Then when the user enters the info and click the resume on the status area, (and I want them to be able to hit enter at this point) it starts the search in the other files. I know it's nit-picky, but the users will never understand why they can hit enter to search in some of the places, but not this one. Thanks! [edit] Ctrl-Enter will continue the paused script, but just hitting Enter would be much better if I could do that!
-Queue- Posted September 23, 2003 Posted September 23, 2003 Ctrl-Enter is the same as a number keypad Enter (hard Enter). The normal Enter is not Enter, but rather Return, as in carriage return or word processing. Train your users to use the hard Enter when they want to continue and the Return-Enter to create new lines like they would in most other programs.
BobWeaver Posted September 23, 2003 Posted September 23, 2003 If your db_search file is only ever used for setting up searches, you could consider this workaround: Create a set of regular fields corresponding with your global fields. Then when the user is in the find script, display the regular fields on the layout and then go into find mode with the pause option set. The user will enter the find criteria in the regular fields. Hitting enter causes the find to terminate and the script to continue. At this point your script should do a modify last find and then transfer the data from the regular fields to the globals, go back to browse and then continue Set Error Capture [on] Enter Find mode [pause] # User enters data in regular fields SearchField1, SearchField2, etc. # Hits enter to execute the find and continue with script # Result of the find are irrevelant # Now restore last find to get the values the user entered Modify last find #Transfer them to the globals gSearchField1, gSearchField2, etc. Set Field [gSearchField1, SearchField1] Set Field [gSearchField2, SearchField2] Set Field [gSearchField3, SearchField3] Set Field [gSearchField4, SearchField4] Set Field [gSearchField5, SearchField5] # The search data is now in your globals # So continue with the rest of your search script here
ddreese Posted September 24, 2003 Author Posted September 24, 2003 Hey thanks, that worked great. The only question I have is, is the 'modify last find' based per user, or last find attempted on the server? This will be in a multi-user enviornment, and I can just imagine user 1's search information being used in user 2's search if they're check it around the same time. Or am I just worrying for the sake of worrying?? Thanks again, that worked great!
BobWeaver Posted September 24, 2003 Posted September 24, 2003 Last Find is based on the user, not the server.
Recommended Posts
This topic is 7734 days old. Please don't post here. Open a new topic instead.
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now