Ron Cates Posted September 17, 2009 Posted September 17, 2009 Hi all, I have a found set of invoices that I need to duplicate. I would like to loop through the found set and create a duplicate record for each invoice then set a couple fields before moving on to the next one. Of course I realise it isn't as simple as looping through and duplicating because once the first duplicate record is created it becomes the last record in the found set and the script then exits the loop (all the better of course, otherwise it would get stuck in an infinite loop). So, Can anyone tell me what the best techniqe for doing this would be? Thanks Ron
LaurenKuhlman Posted September 17, 2009 Posted September 17, 2009 Perform Find Set a $counter = Get ( FoundCount ) Loop Exit Loop If ( $counter = 0 ) Go to Record $counter Duplicate Record Omit Record Set Variable $counter - 1 End Loop
Ron Cates Posted September 17, 2009 Author Posted September 17, 2009 Beautiful!! Thank you very much. I will let you know how it works out.
Recommended Posts
This topic is 5547 days old. Please don't post here. Open a new topic instead.
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now