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

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

Recommended Posts

  • Newbies
Posted

Hi. I have two databases (MASTER DB and VOLUNTEER). I have set up a button in MASTER DB, connected to a script (CREATE NEW VOLUNTEER) that, as you would guess, opens the VOLUNTEER database and creates a new record. The script for CREATE NEW VOLUNTEER is as follows:

Open ["Volunteer"]

Perform Script [sub-scripts; External: "Volunteer"]

This subscript relates to NEW VOLUNTEER RECORD script in the VOLUNTEER database and is as follows:

New Record/Request

Perform Script [sub-scripts; External: "Master DB"]

Paste [select, "Volunteer ID"]

The external script above is simply Copy [select, "ID Number"]. I've used the same two commands within this script for the rest of the information (First Name, Last Name, Address, City, State, Zip, Phone, Email). But when I go back to MASTER DB and execute the script, the first three fields are entered correctly, but then the record's last name appears in the Address, City, State, and Zip fields, and no information appears in the Phone or Email fields.

Does anyone know if there's anything I'm overlooking? BTW, I'm stuck using FileMaker 3, so I'm not ruling that out as the problem.

Thanks in advance!

Rebecca

Posted

First, I am not familiar with FM3, but see if you can do the following:

Why dont you set a relationship "Volunteer ID" that relates VolunteerID::VolunteerID from MASTER to VOLUNTEER DB's. Check "allow creation of related records" in the relationship dialogue box.

In MASTER, set your fields "First Name, Last Name, Address, City, State, Zip, Phone, Email" as VolunteerID::First Name, VolunteerID::Last Name...

this will automatically create a new record in Volunteer DB when you type info into the fields in MASTER DB (the fields in MASTER will actually be displaying the info from Volunteer- none of this will be stored in MASTER, but will all be accesible and editable via the relationship).

Again, I dont know for sure, but I think this is likely to work in FM3.

HTH

  • Newbies
Posted

Thanks for your help!

The only reason I hesitate to do this is that when I create a new record in MASTER DB, it may not, in fact, be a volunteer, but may relate to another database (DONORS). I have essentially the same script set up between MASTER DB and DONORS, and it works fine. I'm assuming the best thing would be to start over and re-create this script from scratch, but I'm feeling lazy at the moment. smile.gif

-Rebecca

Posted

OK, I get it.

a few questions: why do you need both a volunteer and donor database? Why not have both consolidated in a "People" database related by UniqueID with a field "PersonType" that you would set to Donor or Volunteer (or Employee, or Patient or whatever). I cant really think of many scenarios where this would not work (but i dont know your situation)- you could probably do everything you needed to and everything would be related, taking full advantage of FM capabilities (wouldnt have to update info in both files).

If you have your heart set on scripting, lose the copy and paste- awkward and generally a hassle.

try seting a field in both files that is a calc field:

c_calc1 (for the actual calculation, just enter 1)

global field in MASTER:

g_ID

create relationship calc1::calc1 from Volunteer to Master.

and you still have VolunteerID::VolunteerID from Master to volunteer

now run your script in MASTER:

set field g_ID to VolunteerID

perform script(external- New Volunteer (in VOLUNTEER)

set field VolunteerID::FirstName to FirstName

set field VolunteerID::LastName to LastName

set field VolunteerID::Adress to Adress...

your external script "new volunteer" in Volunteer would just be :

create new record

set field VolunteerID to Calc1::g_ID

sorry for the hasty post- have to run, but you get the idea?

Posted

I'm quite sure you've made the "classic" mistake.

Make sure the fields you want to paste into are currently in the layout. When they aren't, FM do paste the information in the first field it comes to see...

  • Newbies
Posted

Hi.

I got sidetracked and couldn't get back here for a while, but thanks for your help! Followed your advice and got it all figured out. I recently inherited this database and since my previous FM experience has been to figure out as I go along, I've been making do with what I have. So I'm sure I'm learning the long way around for most things. tongue.gif

Thanks again!

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