1 Reply Latest reply on Jun 5, 2014 2:22 PM by beverly

    FM newbie trying to figure out how to add a Hyphen to existing Field value

    mysonham5870

      Working with a field (5000 records) that contains account numbers ex.. 1000687714742014 need for the add the hypen after the 12th character to look like : 100068771474-2014 ... help this rookie pls.

        • 1. Re: FM newbie trying to figure out how to add a Hyphen to existing Field value
          beverly

          Left ( myField ; 12 ) & "-" & Middle ( myField ; 13 ; Length ( myField ) )

           

          quick and dirty to grab the first 12 character, append a "-", then grab the rest of the characters starting with #13 and continuing on - since we don't know how many to grab, you can use the full length of the original and it will only append from #13 until there are no more. this calculation should be for a TEXT field result.

           

          Study these text functions for playing with the data:

               Left()

               Right()

               Middle()

               LeftWords()

               RightWords()

               MiddleWords()

          and these "value list" (return delimited phrases) functions:

               LeftValues()

               RightValues()

               MiddleValues()

          in additions these are handy for getting information from what's there for use inside the above:

               Position()

               PatternCount()

               Length()

           

          Well, really study all the text functions.

           

          HTH,

          Beverly