Skip to content

Increment Variable by Row

Post any question you may have in regards to GoAnywhere Director and let our talented support staff and other users assist you.
  • WallyD444 Offline
  • Posts: 10
  • Joined: Wed Sep 17, 2014 8:38 am

Increment Variable by Row

Post by WallyD444 »

I have a project that will concantenate a few columns to form a url, I need a unique value for each row. Currently I'm using the modify column task, but I can't figure out how to create a counter for the unique value.

e.g.:

column 1 column 2 column 3 column 4
www .testing.com/ 0001 www.testing.com/0001
www .testing.com/ 0002 www.testing.com/0002
www .testing.com/ 0003 www.testing.com/0003
www .testing.com/ 0004 www.testing.com/0004
www .testing.com/ 0005 www.testing.com/0005


Column's 1 and 2 are in the file already, I need to create column 3 which increments by 1, then concat all in column 4. I can do everything but create column 3, I'm not sure how to do that without a loop.

Thanks!
  • Support_Rick Offline
  • Support Specialist
  • Posts: 590
  • Joined: Tue Jul 17, 2012 2:12 pm
  • Location: Phoenix, AZ
  • Contact:

Re: Increment Variable by Row

Post by Support_Rick »

Wally,

Not sure you can get to where you want to go from this position. The 2 options I see are you looping through the data and creating the entry you need and writing it out to a CSV then re-reading the CSV when you're done (giving you the incremental value).

Otherwise, inserting the 1st and 2nd values into a Temp Table (database) and create an automatic incremental field then re-read it back with your desired 4th field.

Hope this helps!
Rick Elliott
Lead Solutions Consultant
(402) 944.4242
(800) 949-4696
Post Reply