ddreese Posted October 29, 2003 Posted October 29, 2003 File 'A' has record that I need to duplicate and change a few field values for each record. I have a script in Field 'B' that initiates the script. - Goto Related Records (File A) - Perform Ext. Script (File A -> Duplicate Records) ........- Goto Record (First) ........- Loop .............- Duplicate Record .............- Set Field 1 = "" .............- Set Field 2 = "" .............- Set Field 3 = File C::Global_Value .............- Goto Record (Next, exit after last) ........- End loop It will only duplicate the first record in the relationship, and then stop. Any ideas? Thanks! : )
Fitch Posted October 29, 2003 Posted October 29, 2003 When your records aren't sorted, and you duplicate a record, you'll then be on the duplicated record, which will be the last record. So going to the next record will exit the loop. There are various methods to deal with this: you can start with the last record and use a couple of omits after duplicating, or what probably will work for your existing script, just sort the records before your loop, in which case the duplicated record will follow the record you started with. Note that sorting will automatically put you on the first record, so you can get rid of the Go to first record step.
ddreese Posted October 30, 2003 Author Posted October 30, 2003 Hi, thanks for the quick reply. I'm not too familiar with sorts, but I had tried yesterday what you said and it worked fine. However, when I tried it today, I get an error because it cannot restore the sort. I thought, from my reading, that the sort that is currently active when you create the script will be stored along with the script (so you can use the no dialog function). But apparently my script did not? I guess this is getting into another area from my original topic, but how do I create the script and sort so that I can have it work every time with no dialog??? Thanks
ddreese Posted October 30, 2003 Author Posted October 30, 2003 Ahhhhh, nevermind, I'm an idiot. I did not have the 'restore sort' option checked. Thanks for the help though, it worked great!
Recommended Posts
This topic is 7698 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