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

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

Recommended Posts

Posted

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

Posted

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.

Posted

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

Posted

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.

Posted

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.

Posted

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

Posted

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

Posted

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.

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