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.

Need to Script 337 set field entries

Featured Replies

Is there a quicker way to write a script to enter field values from a related file without doing a set field command for each field? I have three different tables to pull from, but I need to have a button scripted to fill in all of the values in the base table.

FileMaker Version: 6

Platform: Mac OS X Panther

Have you considered Lookup's or Import's

  • Author

I do not need to add a new record, just edit the one that I have. Can I use the lookup within a script?

Yes. Make each field you want to get updated a lookup field. Then in the script do a Relookup Contents [No Dialog, <Key Field>] script step. Do this for each key field that your lookups are based on.

Just remember, this will replace the contents for all those lookup fields with the related value. But if the related value is empty, the field contents will not change.

  • Author

So there would be the same amount of steps in the script that there would be if I did a set field?

An import rather than lookup IMO.

FileMaker Version: 6

Platform: Mac OS 9

The Relookup Contents script step is done for each "key" field, as in "relationship key". So if a bunch of fields in Table1 need data from Table2, and they are related by Table1 ID=::Table2 ID, just do the Relookup on Table1 ID.

FileMaker Version: Dev 6

Platform: Mac OS X Panther

I recommend trying Ugo's import.

  • Author

Can you offer any help in how to script the import? What I tried did not bring the information in.

In the import dialog, select "Update matching records." Match up the fields on the left and right and set the key fields (i.e., the ones that need to "match"). Perform the import. Now create a script with Import Records (Restore).

You can only store one import order in a script, so you'll need to create a separate import script for each file, then you can call all of them from one master script using the Perform Script step.

  • Author

I appreciate the help.

The problem I seem to have is that I need to update areas in the current record, not make a new record.

Everything has been creating a new record with the import. I just need to pull a whole lot of field information to the current record from a master record.

Hi,

The Import would let you choose between several options :

1. Create New Records

2. Substitute datas

3. "Synch" Data

FileMaker Version: 6

Platform: Mac OS 9

pmkprog:

As Ugo points out, what you want is to "Update" records - you even have the choice of whether you want new records created if there are records in the originating file which have no match in the importing file...

-Stanley

  • Author

Thank you very much. I finally got the script to work.

I needed to be in one record only by performing a find first, then I had no problems.

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.