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.

copy default child records

Featured Replies

  • Newbies

Hello,

I'm trying to figure out how to load a related database with default data each time a parent record is created.

To be more specific, I have two related databases, "Projects" and "Tasks". Each time a new Project record is created I want to populate the Tasks database with a number of default tasks.

I've been considering a couple approaches however I'm not quite sure how to implement. I'm assuming I need 3rd database which will serve as the source from which the default tasks will be copied...:

I'm a FileMaker newbie and would appreciate if someone could point me in the right direction.

Thanks!

you should script the creation of new records in both the Project & Task databases. If you have a portal, just issue a go last portal row, enter some data, go to last portal row until all defaults are in the child database.Since you can't do a lookup for multiple child records at a time, it must be scripted.

  • Author
  • Newbies

Christian, thanks for the information. I do have a portal. So, is there a way to read each default record from a third file and add it to the portal as you suggest or are you suggesting the default data is scripted as well?

- hurl

  • Author
  • Newbies

just had a thought... will this approach work?

Given Projects and Tasks are two databases related by their common "Project ID" fields.

1. Create button in the Project database called "Create tasks"

2. The script will set a global variable in the tasks database to the current project ID.

3. The script will import all records from a third file "default tasks". Each of the imported records will have a project ID = 0

4. The script will find/replace all Tasks with Project ID=0 to the value of the global variable which was set in step 2 above.

That seems like it should work.... any thoughts?

Why not do

Go to field [portal::task_ID]

Go to portal row, last -- the empty one

insert calc. result, task_ID,"wahever"

insert calc.result, task_name,"Project start"

and so on.

this will save a third file. Project_ID is entered automatically, because it defines the portal. makes sense if you have no more than 5 default tasks.

Otherwise, using above import example:

If you set field project_ID to auto-enter g_Project_ID and check "perform auto-enter...", you save step 4.

  • Author
  • Newbies

I have quite a few default tasks for each project plus I want to retain the ability easily modify the default list so I went with the import approach.

Thanks for the help!

I've done this in the past with a template file that contains the default records. I just do an import from the template file into the child file and then set the key field in the resulting found set so that they relate to the parent record.

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.