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.

creating a related record doesn't do lookups...why

Featured Replies

I am at a loss with this one! Please help!

I have a solution that has File1 and File2. File1 has a portal in it to create records in File2 via relationship. When I run a script to insert the date into a field in the portal (thus creating a new related record in File2 with an ID number as the matching field), for some reason, my lookups in File2 don't happen. And worst of all, it is intermittent. If it doesn't lookup data the first time, I delete that record from File2 (deleting it from the portal in File1 or directly in File2) then run the same script again, and it's fine - lookups occur in several fields.

The lookups are quite simple - just getting data from File1 and plugging it into File2's fields.

What's going on here??

My script does this:

Go to Portal Row [Last]

Set Field[File2::DateStarted; Get (Current Date)]

Commit Records/Requests [skip data entry validation; No Dialog]

Any ideas? Thanks so much!!!

confused.gif

FileMaker Version: 7

Platform: Mac OS X Jaguar

  • Author

Is it possible that when a new record is created, the "auto-entered" PersonID number is not yet "committed" and therefore when a related record is attempted to be created by my script, it has no ID number yet, and therefore the relationship won't work to perform the needed Lookups???

But then why am I even able to create a related record via the portal in the first place?

I am going to try to add the following first line to my script to see if it fixes it:

Commit Records/Requests [skip data entry validation; No Dialog]

Go to Portal Row [Last]

Set Field[File2::DateStarted; Get (Current Date)]

Commit Records/Requests [skip data entry validation; No Dialog]

I've added one more Commit Records step to see if by committing the File1's record, it should not log the ID number needed for the relationship.

What do you all think?

  • Author

Well, I fixed it. Adding the Commit Record step as the first step of the script fixed the problem. When someone is using the database, they enter data into a bunch of fields then click this button. This method worked just fine with Version 6 of FMP. Odd that it changed with version 7.

Lesson learned, I guess. But I still find it strange that I can make a related record via a portal if the ID is not "committed".

FileMaker Version: 7

Platform: Mac OS X Jaguar

Create an account or sign in to comment

Important Information

By using this site, you agree to our Terms of Use.

Account

Navigation

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.