evancooney Posted January 2, 2003 Posted January 2, 2003 I have two databases / tables. We'll say database A and database B. Database A needs to create a new record in database B. This new record in database B must be contain information from database A. I can create a blank new record in database B from database A. But I don't know how to populate that new record with any info from database A. What should my script look like? Thank You Evan C
andygaunt Posted January 2, 2003 Posted January 2, 2003 You will need a relationship from Database A back to Database B This is usually done with a Global field ( Lets call this global zg_HoldRecordID ) that will hold the unique id for the record in Database B. Now, this can be transferred either by the use of a constant relationship or by adding a copy step into the Database B script. You will need a relationship from this Global to the unique ID field in Database B (Lets call the relationship RecordHold ] So, lets say we do it with the copy/paste method (not my preferred but hey!!) From Database A Perform Script [subscript, external Database B, "Create New Record"] Paste [ zg_HoldRecordID ] Set Field [ RecordHold::TheFirstField, "Something" ] Set Field [ RecordHold::TheNextField, "Else" ] # These set fields are what enter the information into the related fields. You can have as many of these as you like # Set Field [zg_HoldRecordID , "" ] #The above Set Field clears the global field for you # Just remember to add a Copy [Your unique ID field] into your New Record script in Database 2 after the New Record/Request. The preferred option over the copy paste step is to have a constant relationship so you can use the Set Field command to set the global from one database to another HTH and Happy New Year
Recommended Posts
This topic is 8000 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