FileMakerPro10 required fields interfering with data entry.

maryj152
maryj152 used Ask the Experts™
on
I have two tables (Buildings and Cataloging) that are related and over several layouts/tabs everything is working as it should.
I created a new field (BldgNotes) in the Cataloging table, plain text, no options.
There are three fields in the table that are "Required Value"
When I add data to the new field which is on a tab all by itself it calls for data in each of the three fields with the "Required Value".
What is the link that is forcing this? Can I stop it or should I just add the "Required Value" fields to the new layout tab?
Comment
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®
When you designate a field as "Required", FileMaker will check to see that the field has a value whenever you commit the record. This occurs when you modify any field on that record, such as your BldgNotes field. it sounds like someone retroactively made one or more of the fields "required" without first checking to see if those fields had values in them.

You have four options: You can go into the Manage Database screen (assuming you have permission to do this) and remove the "Required" attribute (which you'll find on the "Verification" tab in the Field Options sheet); you can leave the "Required" attribute checked but also check the "Allow user to override warnings" box; or you can give the fields values, either from the user interface or from a script. If the fields really should be required (the person who set that property presumably had a good reason to do so), then you'll either have to put those fields on some layout, somewhere, so you can assign values to them, or you'll have to write a script to assign these fields some sensible values. Here's a sample script to do this:
Show all records
Go to Record/Request/Page [first]
Loop
  If ( IsEmpty( Required_Field_1 )
    Set Field [Required_Field_1; <some sensible value>]
  End If
  If ( IsEmpty( Required_Field_2 )
    Set Field [Required_Field_2; <some sensible value>]
  End If
  If ( IsEmpty( Required_Field_3 )
    Set Field [Required_Field_3; <some sensible value>]
  End If
  Go to Record/Request/Page [next; exit after last]
End Loop

Open in new window


As I said, the other option is to put those fields on some layout somewhere so you can give them values manually. This is the best way if you don't have many records and you can't reasonably determine "<some sensible value>" programmatically. First, check to see that those fields aren't already on some layout: after all, if their values are required, there must be some way of giving them values! If it's necessary or convenient, you can put them on the tab panel you described, or you can put them on a special layout. I always have a "Maintenance" layout for every table in my database. I give it the same name as the table, but precede the name with an underscore (so you might have a "_Cataloging" layout). This layout doesn't have to be pretty, but it DOES have to have every field defined in that table on it. That way, you can always go to this layout to make "back door" changes when necessary. By the way, I collect all the "maintenance" layouts together and put them in a "Maintenance" folder in the Layout Manager, then use the Privileges mechanism to make sure normal users don't have access to those layouts.
I see a slight error in the script code I posted above: The IF statements should look like this:
If [ IsEmpty( Required_Field_1 ) ]

Open in new window

and so forth. Sorry for the slip.

Author

Commented:
Thank you. The 3 fields are necessary in other layouts as is.
I will have to add them to the new layout with a change in value list.

I wasn't think about all fields being  in each record in a table. (flat file mentality)

Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial