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.

Setting a field's value

Featured Replies

Hi,

I'm just getting to grips with FileMaker and I'm having a problem updating a field value in another table.

I have an ID No field in my 'customer' table and an ID No field in my 'contact history' so that I can relate the records. I've used New Records, Set Field and Commit in my script, but the value will not copy over into the 'contact history' table.

Any ideas?

Hi kevin

How are you setting the id in the new (child) record

Phil

  • Author

I have:

Freeze Window

Go To Layout ["Contact History" (Contact History)]

New Record/Request

Set Field [Contact History::ID; Sales Database::ID]

Commit Records/Requests

Go to Layout ["Main" (Sales Database)

etc....

In fact I suspect that it isn't creating the related record any way.

Check out the relationship settings and make sure that "create new records" is checked.

  • Author

I've checked that and it is ticked.

The tables are linked on ID

Anything else I can look for?

Set Field [Contact History::ID; Sales Database::ID]

This won't work. A new record in Contact History does not (yet) have a related record in Sales Database, so the reference Sales Database::ID comes up empty.

Define the button to pass on Sales Database::ID as the script parameter, and change the step to:

Set Field [Contact History::ID; Get(ScriptParameter)]

  • Author

Sorry to be a pain but how do you set the parameter? I'm new to FileMaker.

When you nominate which script to attach to a button there is an option at the bottom to set an optional script parameter.

Set this to Sales database::Id and then you can use it in your other file as per comments suggestion

Phil

  • Author

Hi Phil,

Perfect. Thank you!

Is this the correct way to generate data in another table? This is what I would do in Access but FileMaker is very different.

Kevin

It is one way of setting up the relationship.

Once the id is transferred (and assuming the id is unique) you can then use the set field script step to set data in a related file.

Phil

Have you looked at portals yet?

There's little need to script things then.

  • Author

I'm going to be using portals for other jobs, but this one is to log times and dates behind the scene. We are using FileMaker's ability to be accessed on the web to allow sales reps to access our records and phone customers. We need to log the length/cost of their calls to reimburce them.

  • Author

Thanks. You've been a great help.

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.