6 Replies Latest reply on Feb 5, 2012 6:47 AM by khasim686

    unique keys



      unique keys


      FileMaker Pro


      fm 11 adv

      Operating system version

      win xp

      Description of the issue

      each emp should hav unique ext

      for ex: as shown in the attachment

      emp_id_fk     ext_id_fk

      66             ext00001    ---valid
      66             ext00001    ---not valid (bcoz its already exist)
      98             ext00001    ---valid


        • 1. Re: unique keys

          pls. be more clear.

          a key is unique if you define it ad unique. even in that case you can accept duplicates if you not constrains it in the field validation options.

          • 2. Re: unique keys

            each emp_id_fk should have a unique ext_id_fk it should not allow duplicate values

            • 3. Re: unique keys

              plase, describe how you defined the each emp_id_fk field.


              when define the field, in the validation option:

              check "Unique value" and “Not empty”

              uncheck “Allow user to override during data entry”

              • 4. Re: unique keys

                validation options  of that are like this


                unique value ,not empty both are uncheck 

                bcoz i dont want unique value in all that table

                if i make it unique it wont allow me to add multipel ext_id_fk to that table

                as it shows in the attachment

                let me explain both emp_id 66 and 98 can hav the same ext_id which is ext00001

                but i dont want emp_id 66 to hav duplicate values

                as it shown in the abv attachment

                emp_id 66 already hav ext00001 and it should not allow to add duplicates which already exist

                • 5. Re: unique keys

                  You need to make a new text field called something like EmpID_ExtID which concatenates both fields.  Go to Options on this new field and set it up as Auto-Enter by calculation with:

                  emp_id_fk & " " & ext_id_fk

                  Then back at auto-enter tab, uncheck right below where it says, "Do not replace existing value if any".  In Validation, mark it as Unique and supply your message below.

                  Now if either ID changes (and as they change), this new field will update.  If either of those two IDs combined already exists, it will throw the validation error.


                  • 6. Re: unique keys

                    thaku very much Laretta 

                    god bless u