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.

Something wrong with new record script

Featured Replies

Hi all newbie to filemaker. I have this script that I am writing to add the detail records to a separate table. It seems to work fine except it does not fill the key field with the proper value. I have checked the relationships and it is set to allow adds. It also works if I hard code it in the script. So it must not be pulling the value from the header table when it creates the detail. Can anyone help? Here is the code of the script. Thanks in advance.

Jeff Williams

project_script.jpg

Edited by Guest

You cannot refer to the related ProjectID, because at this point there is no related record in Projects. You need to load the currently viewed project's ID into a variable BEFORE going to the other table, e.g.

Set Variable [$projID ; Projects::ProjectID ]

Go to Layout [ Time ]

New Record

Set Field [ Time::ProjectID ; $projID ]

...

Or use the script parameter to "carry" the ProjectID.

  • Author

That worked perfect. Thank you as always. Great help!

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.