Jump to content
Sign in to follow this  
Greg G

New records

Recommended Posts

Is there a way to script the creation of a specific number of new records without using a loop?

Share this post


Link to post
Share on other sites

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.

Share this post


Link to post
Share on other sites

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

Share this post


Link to post
Share on other sites

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.

Share this post


Link to post
Share on other sites

Imports will only bring over the found set.

Share this post


Link to post
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×

Important Information

By using this site, you agree to our Terms of Use.