Christof Posted July 29, 2002 Share Posted July 29, 2002 I've got a db with 4 layout's. Each layout has a number of fields which needs to be filled in. After completing the fields in layout 1, you'll need to go to layout 2, and so on ... After completing the 4 layouts, you'll have to confirm the creation of the record (if this is possible offcourse ...) by clicking a button. Know I was wondering if it is possible to "secure" the contents of the fields in the layouts. I mean once the record is created, I would like to come to point that the data can't be changed anymore or you'll have to click on the button "change record" ... Is there someone who experience with this kind of "problem" ... Any help is welcome Thx Christof Quote Link to comment Share on other sites More sharing options...
Horsepwr Posted July 29, 2002 Share Posted July 29, 2002 You could have the confirm button go to a layout thats has all fields formatted to not allow entry to field. Then use the Change record button to take them back to the data entry layouts. Quote Link to comment Share on other sites More sharing options...
CobaltSky Posted August 4, 2002 Share Posted August 4, 2002 Hello Christoff, What you want to achieve can be done quite elegantly. Here's how. First of all, if you are doing any data validations, create validation steps for all the fields on a given layout within the script that is attached to a buttons to move the user to the next layout. This is done by setting a sequence of steps for each validation along the following lines: + If["IsEmpty(FirstName)"] + Show Message ["You must enter a First Name before proceeding. Please try again."] + Exit Script + EndIf + If["not IsValid(DateOfBirth)"] + Show Message ["The Date of Birth you entered is not valid. Dates must be entered in the format..."] + Exit Script + EndIf ...and so on. At the end of each script, after all the validations, include a 'Go to Layout' step to take the user to the next layout. Now create a new text field called 'RecordStatus'. The field will not appear on any layouts. After all the validation steps in the script for the fourth layout, add a final step: Set Field ["RecordStatus", "Y"] Now attach the validation script for the fourth layout to your button which is labelled "Confirm Record". Create an additional script with the single step: Set Field ["RecordStatus", "N"] and attach it to a button labelled "Change Record". Finally, open the 'Define Fields' dialog and select each data entry field which is on one of the four layouts, click the 'Options...' button and go to the 'Validation' panel. Turn off any validations you have previously created (remember, all your validations are now being done by the scripts) and turn on the "Validated by Calculation" option, entering the formula: Case(RecordStatus = "Y", 0, 1) For each field, also select the "Strict: do not allow user to override data validation" option, and enter a message along the lines of "This record has been confirmed and cannot be changed. Before changing the record you must enable changes by clicking the 'Change Record' button." Once the above validation settings are in place for all the data entry fields on your four layouts, your solution should function along the lines you are wishing. Once a record has been 'confirmed' users may enter the fields and select and copy the data, but they will be prevented from changing it unless the 'Change Record' button has been clicked (in which case the record will remain open for editing until the 'Confirm Record' button is again clicked). Quote Link to comment Share on other sites More sharing options...
David Head Posted August 4, 2002 Share Posted August 4, 2002 Note: FileMaker would not allow the user to enter an invalid date into a date field so the validation script step using the IsValid() function is obsolete. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.