November 22, 200223 yr Newbies We use a specific layout for finds, because in other layouts in our bespoke database the fields are non-data entry and we cannot search them. We use a find button in other layouts to take the user to our find layout and at the same time to put him in Find Mode. If a find is executed, he is returned to a regular layout for the found record(s), or of course the last record if the find was unsuccessful. My question is, does any kind person out there know how to return the user to another layout if he CANCELS Find Mode? At the moment when Find Mode is cancelled the user stays in our find layout, which has led to corruption of records because the user can inadvertently enter data into the fields where he ought not. Any ideas gratefully received.
November 22, 200223 yr Try having a button in your find layout to cancel out of a find and returning the user into the correct layout. One thing you can also do is to hide the status area to hide the cancel along the left which will cause the problem you are having. Also in your cancel script, have a halt script step to stop the other script from looking for input in find mode.
November 23, 200223 yr This isn't an answer to your question but I think you should know... Denying entry into field is not the best solution for preventing users from modifying data. This can be accomplished more securely through FileMaker's built-in security.
November 23, 200223 yr Newbies "One thing you can also do is to hide the status area to hide the cancel along the left which will cause the problem you are having" Also, temporarily lock the status area before "Enter Find Mode" and then unlock it after "Perform Find" is completed.
November 23, 200223 yr I think they (the user) could still use a command like "Show All Records" to get out of find mode... If the objective is data security, the most important thing is to use the built-in security features. You could still use a separate layout for find though, in which case you still want to resolve these issues for useability reasons.
November 24, 200223 yr you could also use field validation for the fields on the find-layout like if status(currentlayout) = "yourfindlayout" then changing fields on the find-layout results in a validation error. Futheron, I think you can trap the canceling of the find-script by the error it generates, then take your steps in the script. I do not know exactly how. Someone else will.. Harryk
November 24, 200223 yr The simplest answer to this may be to have the find sequence scripted, and to start the script out with the "Allow User Abort [off]" step - which removes the cancel option from the status area and prevents the user from going to another file until the script has completed its run. Then providing the tail of the script (after pausing in find mode) includes a 'Perform Find' step and then a 'Go to Layout[ ]' step, you can be fairly confident that the user will end up in the pre-assigned destination. To get anything much more secure than this, you'd probably want to check out plug-in functions that allow you to lock down the menus and windowing (eg 'MenuControl', 'WindowUtility' etc)
Create an account or sign in to comment