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.

Auto Create Parent w/ Child & Grandchild

Featured Replies

Thanks for checking this out!

 

Anyone know a real simple and straight forward way to script the creation of a Parent record along with the creation of a Child with a Grandchild? The biggest hurdle I need help with is this creation of a record set.

 

So when ran, script would create the flowing set:

  ParentTable-Project

  >  ChildTable-Assignment

      >  Grandchild-Milestone

 

I have all the match fields set up.

Script would be ran from a sorted Grandchild list layout.

Project and Assignment data is shown in a sub summary part.

 

If interested, some files along with demo attached to help illustrate my problem.

 

 

THANKS for any help!

project_create_demo.fmp12.zip

post-80154-0-01751600-1415218327_thumb.p

post-80154-0-48019100-1415218343_thumb.p

Hey Randy,

 

Simple task here, you just need create the records in succession and relate them as you go along. 

 

Here's the script that you need to make:

 

 b0shZac.jpg

  • Author

Thanks GisMo!

 

Figured it would look something like what you illustrated for me.

Did not know if there was a different way, like forcing the creation through a relationship, or something.

 

So, I build it out and is working fine.

Now wondering what is the best way to build a found set of the Project just created?

 

I'm running script from Milestone List Layout. In Browse Mode, displaying data from the related Project and Assignments with sub summery parts.

 

Thanks again! :)

  • Author

Now wondering what is the best way to build a found set of the Project just created?

 

So [Perform Find] works with variables now!!!

 

Last time I tried using a variable for the find criteria it literally searched data "$id_milestone".

But now it seems to work!!!! Searching for "3213" for example.

 

I don't know if I did something wrong in the past, or this is NEW to FileMaker 13

 

So... I got the creation script to work and finish up by finding the new Milestone by setting variable $id_milestone and [performing find on __mp_milestone ($id_milestone)]

Great! I'm glad that worked for you. Also, perform find with variables is not new, but I'm glad you figured that out!

I'm not sure that there's another way to create all the related child records other than the method I posted. Good luck!

Here is another method. Run the create script from the context of Layout #4 in form view with the script debugger on and youll see how the relationships populate the foreign keys

  • Author

Hi Kris M,

 

Not fully following you, do you mind elaborating a bit?

Thanks for chiming in!

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.