1 Reply Latest reply on Feb 15, 2011 3:30 PM by philmodjunk

    Script to move text from one field to another?

    sk

      Title

      Script to move text from one field to another?

      Post

      Hi,

      I need a script that will let me move the data from a "Color" field into a "Description" field against a set of found records. I would need to insert a comma and a space between the fields, so it is added to the existing data in the description field. I tried the Replace Field Contents with a calculation of 

      Description = Description & ", " & Color

      but I have to create the calculation everytime for every found set of records and I also want to clear the "Color" field once the data from it is moved to the Description field. I'm not to clear on the looping script step.

      Any help is appreciated!

        • 1. Re: Script to move text from one field to another?
          philmodjunk

          Make color a global field for the purposes of this script.

          Then Replace Field Contents [no dialog ; YourTable::description ; YourTable::Description & ", " & YourTable::Color ]

          Will append the current value of Color for every record in your current found set in one go.

          Follow it with this script step: Set Field [YourTable::Color ; ""]

          And the color field will be cleared after Replace Field Contents updates your field.