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.

Copying Data after clicking "Yes"

Featured Replies

  • Newbies

I have two database files. I have created a printing scripts that asking if everything is OK. If they click "Yes" I want FileMaker to take Database-1 fieldA info into database-2 fieldA. Then database-2 will do its job. I need this to happen in two seperate fields. This will allow database-2 to create reports from many different databases. I have set all the scripts up just can't make it copy the info from one to the other. It should only copy the info from the current record in database-1.

Thank you.

If you are only copying from the current record into database-2, then this might be another use for a constant relationship. Make a number calculation field in each database, where the calculation is simply the number one. Set up relationships between database-1 and database-2 (both ways) based on the constant fields.

Make two global fields in database-1, call them g_FieldA and g_FieldB (you said you needed to copy from two fields, if there is more, just make more globals).

When the user clicks "Yes", additional script steps need to be included in the script that is running:

SetField (g_FieldA, FieldA)

SetField (g_FieldB, FieldB)

Now have your script call an external script in database-2. The fields you need to fill in database-2 will, presumably, be contained in a single record that is either the only record in the database, or a found set of one. If this is not the case, then the external script will need to isolate the correct record.

The external script fills the two fields in database-2 from the global fields across the constant relationship:

SetField (FieldA, CONSTANT::g_FieldA)

SetField (FieldB, CONSTANT::g_FieldB)

Whenever possible, I always use SetField instead of copy & paste. The script is much more stable that way as it is not dependent on your clipboard, and the fields being set do not have to be visible on the active layout.

If all this needs to happen on more than one record at a time, you will need to build a loop into both scripts.

Steve Brown

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.