Greg G Posted April 19, 2007 Posted April 19, 2007 Is there a way to script the creation of a specific number of new records without using a loop?
David Jondreau Posted April 19, 2007 Posted April 19, 2007 Why the resistance to a loop? If you want to make 5 new records, put 5 New Record script steps in the script.
Greg G Posted April 19, 2007 Author Posted April 19, 2007 It's not resistance to the loop function, I just wanted to know if there was an alternate way to do this. The number of new records is not a fixed amount and will require additional steps to figure the number of records to create. Basically, I need to create the same number of new records in one table as there are in a found set of another table.
mr_vodka Posted April 19, 2007 Posted April 19, 2007 Uhmmm I guess you could try and do an import with empty records but you could still perform the loop with what you want to do. Store the count of the found set into a variable. Set Variable [ $i = Get(FoundCount) ] If [$i] Go to layout ["Other table's layout"] Loop Set Variable [ $j = $j + 1 ] New Record /Request Exit Loop If [ $i = $k ] End Loop End If
Greg G Posted April 19, 2007 Author Posted April 19, 2007 Thanks for the example. This is exactly what i am trying to do except when I perform the import it pulls in all of the records not just the found set. I can't figure out why.
Recommended Posts
This topic is 6430 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