Jump to content
Claris Engage 2025 - March 25-26 Austin Texas ×

Importing record then copying entry to related db


This topic is 8194 days old. Please don't post here. Open a new topic instead.

Recommended Posts

I have a script that will import a record from db 1 to db 2. When the import is complete, the new record is given an auto-enter serial number (in db2). I have a line in the script to close the original file (db1), but before it closes, I need the new auto-enter serial number (in db2) to be placed in the original file (db1). I can't think of a way to set up the relationship for the 2 files because they will not have any fields that match exactly (until the import is done). If this is too confusing, I can possibly explain it a little better, in length, by email

Thanks,

Link to comment
Share on other sites

OK,

when you import, are you not transferring an id number from db1 to the new database.

If you are, you could set a global field to hold that number (and this is used in the relationship back to the original field in db1.)

Then when you have updated your serial number in db2, use Set field relationship::field in db1, global field)

then close db1 down.

HTH

Link to comment
Share on other sites

Let me get this straight.

You are importing a record from db1 to db2, which will generate an id number in db 2 that you then need to x-fer back to the record you just imported from in db 1?

If this is the case, you can do the following. After the import from db1 to db2 and before the script step to close db 1, just add a step to your script that imports that one id number field from db2 back to db1. You would want to make sure that in each database the record you are working with is the only found record.

Link to comment
Share on other sites

Why an import just one record?

Set up a relationship and use auto-lookups. Script in db1 copy relationship field, perform script in db2. Script in db2, paste relationship field, go to serial2, copy serial2, and either complete script in db1 (paste serial2) which completes the script in db1 or paste serial2 in db1 and finish script in db2, depending on where you want to finish.

Link to comment
Share on other sites

This topic is 8194 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 account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

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