Jump 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 to open another database and copy data from one database to another

Featured Replies

I have a database that is used to record inspection information in my manufacturing operation. When we find bad parts, information is recorded in a separate "Rejected parts database". The two tables are related by a serial number field. I'm trying to write a script in the Inspection database to open the Rejected parts database, create a new record and copy the serial number field contents from Inspection database to the Rejected parts database. Here is what I have, that is not working:

Open file["rejected parts log"]

Perform script ["new record" from file: "rejected parts log"]

Set Field[rejected parts log::box serial number;Final inspection sheet::box serial number]

The rejected parts log opens and a new record is created, but the box serial number is not copied?B) I can't figure out why? I've even tried to set a variable with the data to no avail.

Help.

Hi Bill,

Perform script ["new record" from file: "rejected parts log"]

Could you please share what's the contain of the Script Step?

Have you tried "Copy" and "Paste" function?

PS: I know this is not a good practice. It would be better to use variables (Set Variable and Set Field), but if this (Variables) did not work for you, you might try to use that (Copy-Paste). Maybe, other FM guru can give more information about using the Set Variable and Set Field for this particular case.

  • Author

New record script:

Go to layout ["rejected parts log"]

Adjust window [Resize to fit]

Move/resize windo [Current window;Top 1; Left 1]

New Record/Request

Variable's scope is only one single file even though it $$ one, investigate this:

http://www.filemaker.com/help/FunctionsRef-264.html

Next question is why these files aren't related?

--sd

I believe you need to use the script parameter here, not the script result. Something like:

Perform script ["New Record" from file: "RejectedParts" ; Parameter: Inspection::InspectionID ]

...

Then "New Record" script in RejectedParts B)

Go to Layout ["rejected parts log"]

New Record/Request

Set Field [ InspectionID ; Get (ScriptParameter) ]

Commit Record

Create an account or sign in to comment

Important Information

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

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.