January 31, 200323 yr We have a field that we want to force our users to enter a value into it. I have a navigation script that takes the user to a different layout and I entered the following steps: IF(IsEmpty(Field)) Then ShowMessage Else Go to Layout. This works great as long as they use the navigation button. A lot of users will close out of the program manually from this screen without using the navigation button again. I tried using the validation in the field definition but that did not work because I use the field in a portal in a main file that they start from. When they leave the main file it was prompting me to enter a value into the field even though the field wasn't on the layout. That is why I went to using a script. Is there a way to force the user to enter a value before closing out of filemaker manually? I thought I had read something like this on here but I couldn't find it. With all the brilliant minds here, I figured someone could come up with an answer for me. Thanks for any help you can give, John
January 31, 200323 yr Without using a plug-in, the only way I know of is to use a loop in a script: Allow User Abort (off) Set Error Capture (on) Go to Layout (entry layout) Loop Pause/Resume Script End Loop Using these steps prevents the user from quitting FM, but does not prevent changing layouts or running other scripts. That you must do by hiding and locking the status bar and removing other scripts from the scriptmaker menu. To break out, the user must hit a "submit" button, which runs a script that validates the data and ultimately ends with a Halt Script script step. This stops ALL running scripts, so make sure you are where you want to be when the Submit script uses this step. -bd
January 31, 200323 yr Couldnt you also use a validation script that you would set to run when closing the file (edit-preferences-document)? I suppose it would have to include a loop as well.
Create an account or sign in to comment