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.

Phantom record

Featured Replies

  • Newbies

I have 1 database (DB1) that stores standard client record information (name,addr,ph,etc.). I have a second related database (DB2) that stores contact history. New contact records in DB2 are created when a user clicks on a button in DB1, which runs a remote script in DB2. The remote script enters browse mode, creates a new record, displays the client name and ID from DB1, and enters the name of the person creating the history record. The problem is that if there aren't already records in DB2, then the script creates TWO records. Single stepping showed that it creates one when it opens DB2 and enters Browse mode, and one when it runs the "Create new record" part of the script. Once a history record exists, then future clicks of the button in DB1 properly create a single new history record in DB2. I hate to create a "dummy" record in DB2 for clients just so I don't get "phantom" records the first time. Any suggestions are appreciated -- or is this happening because I wrote the script while watching a special about Area 51? smirk.gif

See if your relationship from DB1 to DB2 has "allow creation of related records" checked, if so, uncheck it. This is about the only mechanism (except perhaps a startup script in DB2) that would automatically create a related record.

-bd

P.S. Bob Lazar told me this was the cause! wink.gif

Perhaps I am misunderstanding this, but if you're looking to cleanly add a related record (in DB2) to DB1, this works for me (without phantom records).

From DB1, launch a script that has only two steps:

- Copy DB1 record ID

- (run external script in DB2)

The external script in DB2 is:

- Create new record (in DB2)

- Paste DB1 record ID into the related field in the new DB2 record, establishing its relationship back to the original DB1 record.

- - - -

There are many variations on this general theme, but this simple 'hand-off' from DB1 to DB2 always works. Once you've set the relationship from the new DB2 record back to the original DB1 record, you can set field values in DB2 based on DB1 as needed via script steps, stay in DB2 to finish adding new data to its new record, or in the first script, in DB1, add a thrid step which returns you to the original layout in DB1, and finish adding DB2 data via an already exisiting portal in DB1 of its related DB2 records.

HTH

  • Author
  • Newbies

Thanks for the help! Unchecking "Allow creation of related records" worked like a charm. My scripts were almost exactly as Sharka described, but I had selected that one checkbox in the relationships window. I guess I don't really understand the purpose of that checkbox. I thought that ALLOW creation meant that *I* could create related records, not that the system automatically created a record if the related file didn't already have one. Ah, the joys and mysteries of FMP.

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.