4 Replies Latest reply on Feb 23, 2014 1:32 PM by RickWhitelaw

    Calculated Feild needs testing for being unique

    MstrPBK

      Title

      Calculated Feild needs testing for being unique

      Post

           You people love detail - for this question I ask you to think simple.

           i have entry fields: E1, E2, E3, E4, E5 and E6

           These six entry fields are cantinated into Field 7 to produce a single string of characters. (a calculated field)

           What i need is a test (which FMP Adv does not offer) to see if this resulting field is unique against all previous ones.  Will I have to write a script for this or is there an easier way to get to this answer.

           Peter Kelley - St. Paul, MN USA

        • 1. Re: Calculated Feild needs testing for being unique
          philmodjunk

               We don't love detail, but if we don't get that detail, we often cannot offer effective help. In your case, there's a simple solution.

               Go to Manage | Database | Fields

               Find your calculation field and change the field type to "Text".

               Double click it to open Options.

               On the auto-enter tab, select the calculation option and also clear the "do not replace existing values" check box. (The calculation you defined for this field will automatically appear in the specify calculation dialog that opens when you select the Calculation button.)

               Now you can click over to Validation and specify unique values as the validation field option for this field to limit the value in this field to unique values.

          • 2. Re: Calculated Feild needs testing for being unique
            MstrPBK

            PhilModJunk

                 Thank you for the Acme hammer, and pointing out the obvious.  i generally never think of text as a calculation point to start from.  I will play with this approach and see where it leads to.

                 Peter Kelley - St. Paul, MN USA

            • 3. Re: Calculated Feild needs testing for being unique
              philmodjunk

                   Please note that I had to assume a detail not explicitly stated in your original post:

                   That your calculated text field and the fields E1, E2, E3, E4, E5 and E6 are all defined in the same table. This method will not work if this is not the case.

              • 4. Re: Calculated Feild needs testing for being unique
                RickWhitelaw

                     "Thank you for the Acme hammer, and pointing out the obvious. "

                     but was it obvious before Phil explained it? wink

                     Happens to me all the time.