Jump to content

Make new record in other database


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

Recommended Posts

What is the best way to make a new record in another database?

I want to make a button, resulting in first checking if the record doesn't allready exist, if no: copying the contents of a field from database A into a field in Database B, creating a new (related) record.

Link to comment
Share on other sites

I have a situation where I have a contact database, People. Some of the People are also clients, so I want to keep additional info on them in a separate DB, CCRD.fp5 (CCRD = Confidential Client Record Database). If a person in People.fp5 is a client, I click on a button to see their client record. If a client record doesn't exist, one is created and I'm taken to it.

The CCRD relationship is just bewteen the ID in the People.fp5 and ID in CCRD.fp5. The first script is in people.fp5. The second is in CCRD.fp5.


if [isempty(ccrd::ID)]

   set field [ccrd::gCurrentPersonID]

   perform script [external: ccrd.fp5 NewClient]

end if

Go To Related Record [CCRD]







And The NewClient script is just:





New Record / Request

Set Field [iD, gCurrentPersonID]

Once you've got a related record created you can mave data between them as you need.

Dan

Link to comment
Share on other sites

This topic is 7358 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.