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.

Trouble setting the record id for a new record

Featured Replies

I have recreated a script which checks for a related record with the parent file. It suppose to then go to the related record, if found, and display it in the desired layout.

If not, I want a record created with the contactid from the related parent file posted to the contactid of the related file.

But the id is simply not being entered in the record. Is there a problem with my attached script?

wps_RestrictedContacts.pdf

you never copy (or set a global) of the contact id - so the "paste" will paste nothing.

Please don't use copy and paste to pass the primary key to the child table. It destroys the current contents of the clipboard and requires the target field for the copy and the paste step to be on the current layout. Instead, use a script parameter assigned at the button level or a script variable (available in 8) to pass the value from one table to the next and then Set Field to place the value into the foreign key field e.g Get(ScriptParameter) or $PrimaryKey. My preference is for the script parameter since it is compatible with FileMaker 7 and is more adaptive. In other words, you could assign a different primary key for each button that runs this script simply by changing the optional parameter at the button level. The only way to do this with a script variable is to write a conditional formula that will adapt only when you modify the condition. In other words, with some other dynamic programming (such as with the Go to Layout step) you could have a single script that creates child record no matter which parent table you start with.

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.