3 Replies Latest reply on Mar 6, 2014 11:14 AM by philmodjunk

    Intials

    MehrdadBastan

      Title

      Intials

      Post

           Hi friends

           I have a filed contains

           John Smith

           Jane Sue Daye

           . How can I extract the first  initials i.e.

           J S

           J M D

           from the name, I know this is a very simple thing to do but it is really driving me crazy.

           Thanks

        • 1. Re: Intials
          philmodjunk

               Let ( L = Left ( Leftwords ( YourField ; 1 ) ; 1 ) ; Left ( MiddleWords ( YourField ; 2 ; 1 ) ; 1 ) ; Left ( MiddleWords ( YourField ; 3 ; 1 ) ; 1 ) ;
                       Substitute ( L ; ¶ ; " " )
                      )

               This will work for names of no more than three words. Given the many formats possible and the possible use of hyphenated names, it may not work for all possible names.

               A more flexible recursive function could be employed that works with any number of words in this field if you have FileMaker Advanced.

          • 2. Re: Intials
            MehrdadBastan

                 Thanks again for your response,

                 This formula tells me there are too many parameters in the function

            • 3. Re: Intials
              philmodjunk

                   Left out a function call:

                   Let ( L = List ( Left ( Leftwords ( YourField ; 1 ) ; 1 ) ; Left ( MiddleWords ( YourField ; 2 ; 1 ) ; 1 ) ; Left ( MiddleWords ( YourField ; 3 ; 1 ) ; 1 ) ) ;
                           Substitute ( L ; ¶ ; " " )
                          )