5 Replies Latest reply on Sep 26, 2012 12:43 PM by philmodjunk

    Formating telephone number guidance doesn't work for FM12

    jimb6451

      Title

      Formating telephone number guidance doesn't work for FM12

      Post

           KB Answer ID: 5839  only works for FM11 and older. In FM12, Fill Pattern has been removed. THerefore, only when the record is the focus does the phone number display correctly. When not in focus, both fields display making the nubers unreadable. Is there a new procedure that will work?

        • 1. Re: Formating telephone number guidance doesn't work for FM12
          schamblee

               There are different methods.  I use the following: In the Field (HomePhone) Check the Calculated Value check box and click specify and paste the following script.

                

               Let (
                       [ num = Filter ( HomePhone ;"0123456789" );
                         num = Case(Left(num;1)= "1"; Middle(num;2;20); num);  // remove 'Dial 1' if it's there
                           len = Length(num) ];

               Case( len = 10; TextColor(Left( num; 3) & " " & Middle( num; 4; 3) & "-" & Middle( num ;7;4); RGB(0;0;0)); // with area code
                         len = 7;  TextColor( Left( num; 3) & "-" & Middle( num;4;4); RGB(0;0;0)); // without area code
                         TextColor(num; RGB(255;0;0) ) ) // wrong length so make text red
               )

          • 2. Re: Formating telephone number guidance doesn't work for FM12
            philmodjunk

                 And note that you can set this up as an auto-enter calculation that automatically "fixes" the data entered if you also clear the 'do not replace existing value' check box.

            • 3. Re: Formating telephone number guidance doesn't work for FM12
              philmodjunk

                   And your original calulation field will probably work correctly if you change the calculation field's return type from "number" to "text".

              • 4. Re: Formating telephone number guidance doesn't work for FM12
                jimb6451

                     Thanks for the responses Phil. Here is a screen capture that shows the problem. THe calculation results were set to 'text'. I may be better off to use a Trigger Script to open a new window with just the fields 'phone', 'type',and 'mask'. Then just display the calculated result. What do you think? I have found at least three different whay to calculate the formated number and like your the best, except I plan to change it to put parens around the first three numbers.

                     THe upper phone numbers is the what displays when the record isn't the focus. The lower one (BandG, inc) is the current record.

                • 5. Re: Formating telephone number guidance doesn't work for FM12
                  philmodjunk

                       Seems like your mask field needs an opaque fill color instead of being transparent. Also make sure that access when in Browse mode is not allowed for the upper field.

                       Oh, I see what's wrong now. Go to Layout setup and clear the "Delineate" check box. That option limits field formats such as fill colors to only the current record. Clear that option to see those settings applied to all records instead of just the current record.