AnsweredAssumed Answered

Duplicate Found Set of Records

Question asked by Terri on Jan 31, 2012
Latest reply on Jan 31, 2012 by philmodjunk

Title

Duplicate Found Set of Records

Post

I found a post that answers my question perfectly regarding duplicating a found set of records. However, I have one more trick. My record name (or ID) consists of 6 variables. For example AB12US. The middle two variables represent the year. There is also a year field that I would need updated. So, I want this script to duplicate the record and replace the year field with the next year (add 1) and also update the record name with AB13US. Any ideas?

 

Here's how I'd do it:

Freeze Window
Enter Find Mode[] clear pause check box
Set Field [Table1::DateActual ; Table1::Date Find ]
Set Error capture [on]
Perform Find []
Loop
   Exit Loop if [ get ( FoundCount ) = 0 ]
   Duplicate Record/Request
   Set Field [Table1::DateActual ; Table1::DateReplace ]
   omit record
   go To record/request/page [first]
   omit Record
End Loop
Enter Find Mode[]
Set Field [ table1::DateActual ; Table1::DateReplace ]
Perform Find[]

Outcomes