2 Replies Latest reply on Mar 20, 2014 1:12 AM by morganbleak

    Record ID Validation "Not Empty" "Unique" Gives me Error Message.

    morganbleak

      Title

      Record ID Validation "Not Empty" "Unique" Gives me Error Message.

      Post

           Dear Sirs,

           I placed a portal in a layout.  when I enter a record in the portal and click outside of it I get the error message:   "_KP_Drive_ID" is defined to contain unique values only. Allow this duplicate value?"  Revert Record.

           I don't see what it is duplicating.  the record ID is not the same as any other ID, it increments properly.

           There obviously is something I am missing.

           Morgan

        • 1. Re: Record ID Validation "Not Empty" "Unique" Gives me Error Message.
          philmodjunk

               I would guess that _KP_Drive_ID is a field defined in the portal's table and that this is a match field in the relationship linking the layout's table to the portal's table. You have also set up a validation field option specifying unique values for this field.

               Thus I would guess that your relationship includes something like this for match fields:

               LayoutTable::ID Field = PortalTable::_KP_Drive_ID

               When you use the portal to add a new record to the portal's table with "allow creation of records via this relationship" enabled, FileMaker Copies the value from the match field in the layout's current record (ID Field) into the _KP_Drive_ID field. Once you have one record in this portal, you cannot add a second related record because that will create a second record with the same value in _KP_Drive_ID.

               This suggests that either this field should not specify unique values only or you have incorrectly selected it as a match field in this relationship. If you are using correct naming conventions, the KP stands for primary key and should identify a field that only permits unique values in the table where it is defined so either the field is also misnamed or this is the wrong field to use in the one to many relationship required for a portal.

          • 2. Re: Record ID Validation "Not Empty" "Unique" Gives me Error Message.
            morganbleak

                 Thanks Phil,

                 I had to change the relationship:

                 _KP_Computer::_kf_Drive_id

                 This made it work.

                  

                 Thanks,

                 Morgan