Jump to content

Auto Create Parent w/ Child & Grandchild


This topic is 2945 days old. Please don't post here. Open a new topic instead.

Recommended Posts

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

Link to comment
Share on other sites

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

Link to comment
Share on other sites

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! :)

Link to comment
Share on other sites

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)]

Link to comment
Share on other sites

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!

Link to comment
Share on other sites

This topic is 2945 days old. Please don't post here. Open a new topic instead.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...

Important Information

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