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

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Sign in to follow this  

×
×
  • Create New...

Important Information

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