Page 1 of 1

Trouble with New Record Creation

PostPosted: Fri Mar 10, 2006 9:27 am
by perryl7
Hey there,
I am having problems creating a new record in a related file. I have a database of recruits and all of their information that is related to a high school database table containing addresses and other contact information. I do a lookup of information and am able to update the HS DB from the Recruit DB using the "Go to Related Record" script.

The problem I am running into is that I cannot seem to create a new record in HS DB file. I want to do this from the Recruit DB if I enter the information and the HS isn't found in teh HS DB. I have tried many different scripts. They usually start with "Open File". When I try the "New Record/Request" but it creates a new record in the Recruit DB.

Is there anyway to create a new record in a related table from the Recruit DB using a script? Preferably without using a portal. Thanks for your help.

PostPosted: Fri Mar 10, 2006 9:41 am
by John Sindelar
I think you simply need to call a script in the target file and perform record there. In Recruit DB you'd "PerformScript (External)" and then specify your new record script in HS DB.

Hope that helps.

PostPosted: Fri Mar 10, 2006 10:18 am
by perryl7
I will give that a shot. How do I pass the information to the other file? I have about 12 fields to add to the new record. Thanks again. I really appreciate it.

PostPosted: Fri Mar 10, 2006 11:08 am
by John Sindelar
perryl7 wrote:I will give that a shot. How do I pass the information to the other file? I have about 12 fields to add to the new record. Thanks again. I really appreciate it.


Sure. You can "pass" the required information to the new file by means of a ScriptParameter (in FileMaker 7 or 8 ) or by storing it in a global field (in either file). Alternately, you can simply set the ID that will create the related record and then pass the information to it across a relationship set up for this purpose.

If you're using FileMaker 7 or higher, search FileMaker's built in help for "ScriptParemeter" and that should get you started.

Hope that helps,

John

PostPosted: Fri Mar 10, 2006 3:09 pm
by perryl7
Thanks John, I got it working.