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.

Relationship Basics Question

Featured Replies

Struggling with new learning curve with version 7.

I have a complex file with tons of fields and scripts.

I would like to populate a related file with data from just 2 of the fields.

When a new record is created in CmplxFile1, i want a new record created in simplefile2, automatically with the exact data from the two fields populating the records in simplefile2.

The new fm7 table is confusing me and my simple file relationships aren't working!

Suggestions?

  • Author

Crash course one whole night educated me but I'd love for some tips on copying records from related files tips or cool tricks.

Is there somewhere you guys go because i'm not seeing any in this forum under that topic that are really relavent?

It's unclear whether you want to be creating shadow records only for *newly created* records (as the end of your post suggests), or whether you want to create shadow records for all your existing records.

For your existing records, just go to simplefile2 and do an *import* and line up the desired fields from CmplxFile1 so that they'll match with your two desired fields.

To know how to handle the creation of new records, I'm inclined to ask about the *purpose* of these simple-db "shadow records". For example, I have a separate file with pictures, and I want it separate from my people data file so that I'm not hogging up megabytes in my frequent back-ups. But in a case like that, I don't really *need* to have a shadow record in the pix table *until and unless* there actually is a picture. So, I wait until there's a picture, and I just have the related picture field included on my main db's record for each person. I set up the relational link to enable creation of related records in the pix table (which is in a separate file, though it could be in the same file under FM7). So, as soon as I paste into this empty container field in my "people" layout, viola! a new pix table record is created, and it sets up the new record with the right match field(s) automatically.

Generally, you won't want a simpler database which has simply a *subset* of the larger db's fields. You'll want it to track some additional dimension. Then, you can make records auto-populate themselves with the relational match key whenever that new dimension of data becomes relevant.

Say more if this is unclear or irrelevant to your concerns...

Hi Schotja

I am fairly new to FM7 myself but i have done what you want to do.

"When a new record is created in CmplxFile1, i want a new record created in simplefile2, automatically with the exact data from the two fields populating the records in simplefile2."

in the relationship box, choose CmplxFile1 on the left side and Simplefile2 on the right side and check the box on the right side that states "Create New record in related file."

Write a script and use the set field command to populate the two fields that you want.

I hope this helps and i think i got the relationships right, if not, just reverse them.

Lionel

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.