Jump to content
Claris Engage 2025 - March 25-26 Austin Texas ×

This topic is 7971 days old. Please don't post here. Open a new topic instead.

Recommended Posts

Posted

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. laugh.gif

Thanks for any help you can give,

John

Posted

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

This topic is 7971 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 account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.