Jump to content
Claris Engage 2025 - March 25-26 Austin Texas ×

Recommended Posts

Posted

Greets, all:

Kudos to Matt at ISO FileMaker Magazine for creating an easy-to-use solution for duplicating parent/child records. (I've touched it up for my use so it's slightly different from the original.) 

I'm having a royal brain hernia trying to figure out how step 46 in the Duplicate Invoice (id) script creates a new (child) record--I'd appreciate an easy-to-understand explanation of how that works.

I know one can create a new child record using a portal where if you enter data into a field it creates a new child record, but am I to understand that as long as there is a relationship between two tables--and the "Allow creation of records in this table via this relationship" checkbox is ticked in the Edit Relationship windoid--one can create a new record from the parent (or in this case, the LINE_ITEM table) using the Set Field command that "looks" at the child (LINE_ITEM__SelfJoin) T.O.?

 

Thanks in advance for enlightening this old geezer,

Rich

Duplicating Related Records.fmp12.zip

Posted (edited)
22 minutes ago, Rich S said:

how step 46 in the Duplicate Invoice (id) script creates

Sorry, I am not going to look at a script that has 46 or more steps...

 

22 minutes ago, Rich S said:

am I to understand that as long as there is a relationship between two tables--and the "Allow creation of records in this table via this relationship" checkbox is ticked in the Edit Relationship windoid--one can create a new record from the parent (or in this case, the LINE_ITEM table) using the Set Field command that "looks" at the child (LINE_ITEM__SelfJoin) T.O.?

Yes. If there is no related record in the child table, then setting a field of the child table from the context of the parent will create a new record in the child table and populate the match field of the child to match that of the parent.

There are some additional (undocumented) characteristics of this behavior that people have utilized; do a search for "filemaker magic key" for more reading on this.

 

Edited by comment
  • Like 1

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
×
×
  • Create New...

Important Information

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