ikmattie Posted February 4, 2004 Posted February 4, 2004 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.
DanBrill Posted February 4, 2004 Posted February 4, 2004 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
oilman Posted February 4, 2004 Posted February 4, 2004 Make a relationship between the two db using a unique id and check the create new record box when you make the relationship and write a script using the "set field" command and attach it to a button. Hope this helps Lionel
DanBrill Posted February 4, 2004 Posted February 4, 2004 Oh, I'd never thought of that outside of a portal. That's much more direct. Thanks. Dan
Recommended Posts
This topic is 7598 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