Is your found set sorted?
If your found set is unsorted, then when you duplicate a record, it adds it to the end of the found set and jumps to that record. Then your Go To Record [next] script step moves it beyond the end of the found set and it's done.
If you run the script in FM advanced's script debugger or put a pause step inside the loop, you'll see why.
Duplicate record creates a new record that will appear at the bottom of your current found set and also, it will be the current record.
And this adds to your found count, it will never reach zero
Go to Record/Request /Page [First]
Omit record ---> omits new record at end of found set
Go to record/request/page [first]
Omit Record --->omits original record at beginning of found set
exit loop it [ not get (FoundCount)]
Thank you both very much, I get it now. thank you thank you thank you ....I was getting very frustrated.
I must remember to search the discussions first before posting a question.
We all sometimes get "blinders on" and having someone take a fresh look then clues us in.