5 Replies Latest reply on Jun 24, 2012 8:44 AM by nella

    Serial Number Mod?

    nella

      Good day all,

      I've been asked to change our existing serial numbers to include letters.

      For example; the existing serial number 2138 would be changed to P2138R

      Firstly, is this possible?

      If so, how would I go about this?

       

      Many thanks

        • 1. Re: Serial Number Mod?
          MicheleOlson

          Hi Nella,

           

          If the serial number in question is used as the primary key and may be linked to records in other tables, changing it would require changing the values in the other tables.

          Primary keys should follow a few rules:

               non-modifiable;

               unique;

               not based on any data that can change [such as phone number] or has meaning in the data record,

                and optimally gererated by FileMaker.

           

          If by some chance the users look at the value as something they use or understand, and now want to use that for another reason - adding the character values - I suggest adding a new calculation field that appends the "P" in front and the "R" behind the serial number.

           

          This field could be be displayed for the users that need the changed serial number, while the one in use as a primary key remains intact.

           

          HTH,

           

          Michele

          • 2. Re: Serial Number Mod?
            usbc

            Ditto

            Plus if your user has/wants a scheme that tells a story, as is implied by their request, you could add a prefix and suffix field for them to add the "P & R" to feed the calculation Michele described.

            • 3. Re: Serial Number Mod?
              nella

              Thanks for your reply.

              This is not a key used for relationships just serial.

              I don't think it matters if the serial looks like P2138R or PR2138.

              I need to make sure the original number doesn't change.

              • 4. Re: Serial Number Mod?
                beverly

                IF this is just a presentation (display) of the number, in layout mode Type the "P" followed my the MERGE of the field followed by the "R".

                For example if the number field is named 'serial', put this on the layout:

                     P<<tableOccName::serial>>R

                or

                     PR<<tableOccName::serial>>

                 

                You can find the menu item in Layout Mode "Insert", "Merge Field".

                 

                If you want to make a field (searchable) with these, then create a calculated field with the required values.

                 

                Beverly

                • 5. Re: Serial Number Mod?
                  nella

                  You just have to love simplicity.

                  Thank you Beverly.