4 Replies Latest reply on Mar 31, 2011 9:42 AM by branditrue

    Formating a fixed length number field (7.2)- Filemaker Pro 8.5

    branditrue

      Title

      Formating a fixed length number field (7.2)- Filemaker Pro 8.5

      Post

      My database has an account number field that I need to set up to always display as 7.2 (9999999.99). There are often leading zeros.

      I have found several ways to do this using Filemaker Advanced, however at the time that is not what my office is using... though I will be PUSHING for an upgrade after seeing how much easier this stuff is with the right tool!.

      Is there any way to do this in my ancient version?

       

        • 1. Re: Formating a fixed length number field (7.2)- Filemaker Pro 8.5
          raybaudi

          The calculation engine is the same...

          "There are often leading zeros"

          So you'll need to use a text field, not a number field.

          BTW: what actually does the user enter ?

          • 2. Re: Formating a fixed length number field (7.2)- Filemaker Pro 8.5
            philmodjunk

            With FileMaker Advanced you can create custom functions, but once you have added that function to a file, any installation of FileMaker Pro can use it.

            • 3. Re: Formating a fixed length number field (7.2)- Filemaker Pro 8.5
              Frinholp

              I have never used FM 8.5 and I'm not too accustomed with the available functions.

              Doing a quick search the RepeatText function seems to be the way forward. I have only just started developing using FM 11 and I don't think  RepeatText is a function included.

              If you don't have advanced I am thinking create a number field which will hold the number before formatting. Set-up a calculation field to use the unformatted field

              = RepeatText ( 0, 9 - Length ( UnformattedField))

              So if UnformattedField = 12345 the calculation field will evaluate as 000012345

              I'm sure you can work on this info to achieve a solution.

              As I say I am unfamiliar with < FM 11 but I hope this helps.

              Lee

               

               

              • 4. Re: Formating a fixed length number field (7.2)- Filemaker Pro 8.5
                branditrue

                Original entry was into an Excel file and even though I had tried changing my Filemaker Pro field to a text field, I did not think to go back and check the source file. It was showing correctly there, but only becuase that field was set up in Excel as a custom number format.

                If I changed that field to text in Excel, it lost the formatting. So I cut that column out and pasted it into WORD, then added a NEW text column to the Excel file, re-pasted the account number column back into the new Excel field and saved... Then then finally when I reimported into the text field in Filemaker it worked! It is now formatted correctly, at least as a starting point.

                Doesn't prevent someone from entering incorrectly now that it is part of the Filemaker DB, but this will do for now!

                Thanks!