Shane Posted November 9, 2001 Posted November 9, 2001 Here's a little idiot proofing workaround I just found and thought I'd share it. Again I'm a novice, so if this is everyday newbie stuff just smile and ignore it. you guys help me a lot so I want to give back. Anyway, I find that when I create layouts for users to create their own set of criteria for finding with certain fields, the user usually does OK until FM warns that there is no match for what they want to find. This is where the idiot part comes in. The dialog appears giving the user two options: Cancel, or Modify find. It happens too often that the user chooses cancel, and (seemingly unbeknownst to them, they have exited Find mode and entered Browse mode) continue to refine their find criteria, when actually they are modifing the record in all sorts of horrifying ways. The workaround I used was to create duplicates of the the fields in the find criteria layout. I define the duplicate as a calculation whose formula is simply the original field name. This way, values can only be entered in find mode. If the user cancels and (seemingly unbeknownst to them) enters Browse mode, and try to refine their find, FM will present the dialog notifying them that that field is not modifiable (because it is the result of a calculation).
Kurt Knippel Posted November 10, 2001 Posted November 10, 2001 This is a pretty good idea. Having a dedicated Find layout it great! Really help to keep things organized. Although this works pretty well, I find that I do not like just dropping users in the middle of a process or forgetting what thier find criteria was. You can Set Error Capture [on] just before the Perform Find step, the do a check for error 401 or a found set of 0. And then keep the user in the script or do something that pops them back to a familiar place. You can also use Global fields to gather the find criteria first, then go into find mode, set the real fields to the Globals and perform the find. Including the above tip as well, will really give you a powerful Find system.
Tom England Posted November 26, 2001 Posted November 26, 2001 I understand how to use the Error Capture script step, but what do you mean by: "then do a check for error 401 or a found set of 0."
Steven H. Blackwell Posted November 26, 2001 Posted November 26, 2001 From the on-line Help file: 401 No records match the request However if you test for Err 401, you also need to test for statusFoundCount=0 Or, you can just test for statusFoundCount=0 by itself. Then, if no records are found, you can do a FindAll, so as not to leave the user in an empty found set, return to the prescribed layout, etc. HTH Old Advance Man
The Bridge Posted November 26, 2001 Posted November 26, 2001 quote: Originally posted by Tom England: I understand how to use the Error Capture script step, but what do you mean by: "then do a check for error 401 or a found set of 0." Immediately after your Perform Find script step, check for errors with: If[status(CurrentError)=401 or Status (CurrentFoundCount)=0] . . . End If
Recommended Posts
This topic is 8469 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