Newbies Ray Gans Posted September 20, 2003 Newbies Posted September 20, 2003 I'm having difficulty with a situation where when I exit from an newly added record (via script), without filling information in all the required fields, I get 3-4 "requires a value" errors for the same field, then a question about continuing with the script, and then one more "requires a value" error. The number of errors are independent from how many required fields are empty. Any ideas what might be causing it? My database has a three file grandfather --> parent --> child relationship. One presses a "Done" (or Cancel) button at the bottom of an entry screen to commit the record (by exiting the form) and return to the parent record. When the required fields are not all populated, I get these multiple error messages. One error is OK, multiple are not.
kenneth2k1 Posted September 20, 2003 Posted September 20, 2003 Hi: Sounds to me like when you are exiting the record, it is telling you that certain fields are required. This is field validation. If the new record process was scripted, then after the error happens, the new record script is asking you if you would like to complete the rest of the steps in that script. The developer probably has it this way so that you cannot exit that record without entering important info. Or he screwed up, because all required fields should be on the current layout. If you want to avoid this error from coming up, do this: 1. Take note of the name of the fields as the validation error comes up. 2. Go to File/Define Fields, select the field and click Options. Click the Validation Tab on the top and uncheck "Not Emtpy" and click Ok. you will have to do this for every field that has this "not empty" validation. On a side note, I think it is a good practice to put "Allow User Abort [Off]" and "Set Error Capture [on]" at the beginning of every script that has to do with record manipulation. Hope this helped ken
Newbies Ray Gans Posted September 20, 2003 Author Newbies Posted September 20, 2003 Thanks. I understand why the error is happening (i.e., because a required field is being left empty). I'm trying to debug the exit added record script for situations where the user forgets to enter all the required fields. The behavior I wanted is for FM to tell the user the name of the field left empty and then exit the commit script. What happens is that when the user clicks "no" (i.e., don't leave the field empty), FM asks the same question again... another "no" click, and it asks the same question again (about the same field) for a total of 3 or 4 times, then it asks if the user wants to exit the script. My question is why it asks the same question so many times, and is there a way to stop it? BUT..... you gave me the answer --> "Allow User Abort [Off]" and "Set Error Capture [on]" does the trick! Thanks! Ray
kenneth2k1 Posted September 20, 2003 Posted September 20, 2003 A couple of more thoughts that might help: You might want to consider using all global fields on your new record layout, and then setting these global values to your record fields if the user clicks ok, and clears the globals if the user clicks cancel. If they click ok, then you would have the ok script check if the required globals are full. You can also put a red asterisk on every field label that is required. Ken
Recommended Posts
This topic is 7805 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