2 Replies Latest reply on Mar 7, 2014 6:20 AM by philmodjunk

    Get First Words

    hrcap

      Title

      Get First Words

      Post

           Morning All

            

           I hope you are well.

            

           A quick question for you:

            

           My usernames are in the format:     company_name/firstname.surname 

            

           I want to set a variable with the value being company_name so i need to 'grab' the first words that occur before the '/'

            

           I am unsure how to do this and any help would be appreciated.

            

            

           Thanks in advance

            

           Hadleigh

        • 1. Re: Get First Words
          philmcgeehan

               Make a Calculation field with text type.

               Left ( UserName ; Position ( UserName ; "/" ; 1 ; 1 ) -1 )

          • 2. Re: Get First Words
            philmodjunk

                 But it would be better design to put these three names in separate fields in your database. Then no special expression is needed to access just one of the text items in this field. If this is how the data is imported from another source, I'd use expressions such as that shared by Phil_1986 to parse the data into separate fields as part of the import process.