Trouble with New Record Creation

General support questions.
Posts: 7
Joined: Mon Mar 06, 2006 1:50 pm
PostPosted: Fri Mar 10, 2006 9:27 am
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.
PerryL7
FMP: 8
OS: Mac OS X Tiger
SeedCode Staff
SeedCode Staff
Posts: 2764
Joined: Thu Nov 20, 2003 11:01 am
PostPosted: Fri Mar 10, 2006 9:41 am
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.
John Sindelar
SeedCode
Posts: 7
Joined: Mon Mar 06, 2006 1:50 pm
PostPosted: Fri Mar 10, 2006 10:18 am
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.
PerryL7
FMP: 8
OS: Mac OS X Tiger
SeedCode Staff
SeedCode Staff
Posts: 2764
Joined: Thu Nov 20, 2003 11:01 am
PostPosted: Fri Mar 10, 2006 11:08 am
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
John Sindelar
SeedCode
Posts: 7
Joined: Mon Mar 06, 2006 1:50 pm
PostPosted: Fri Mar 10, 2006 3:09 pm
Thanks John, I got it working.
PerryL7
FMP: 8
OS: Mac OS X Tiger

Return to General Support

Who is online

Users browsing this forum: No registered users and 2 guests

cron
(855) SEEDCODE
[email protected]
Follow us: