1 Reply Latest reply on Mar 3, 2010 11:46 AM by philmodjunk

    Deleting Selection

    liquidcooled

      Title

      Deleting Selection

      Post

      I have imported data from an Excel File. The file has one field that has both first name and last name. I was able to get my script to copy the last name to another field but I can't figure out what step to use to clear the last name from the original field. My table has three fields one for last one for first and one for account My script looks like this:

       

      Set Variable [$lastname; Value:LeftWords (Table::Firstname; 1)

      Set Field [Table::LastName; $lastname]

      Set Selection [Start Position: LeftWords ( Table::Firstname ; 1)

       

      What goes next? to clear the selction?

      Thanks

        • 1. Re: Deleting Selection
          philmodjunk

          First of all, you don't need a variable for this.

           

          Set Field [Table::LastName; LeftWords (Table::Firstname; 1)]

           

          Should do the job.

           

          Now use this step to remove the first name:

           

          Set Field [ Table::FirstName ; Middlewords ( Table::Firstname ; 2 ; 99 ) ]

           

          The above steps assumes you won't have more than 99 words in your first name field.