Skip to content
View in the app

A better way to browse. Learn more.

FMForums.com

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Script straightforward but getting hung up midway

Featured Replies

  • Newbies

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

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

  • Author
  • Newbies

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

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?

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...

  • Author
  • Newbies

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!

That is one example of Cut and Paste problems, even when its your own database. Use setfield instead. Didn't tried get field yet.

Create an account or sign in to comment

Important Information

By using this site, you agree to our Terms of Use.

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.