Jump to content

Creating "child" records from parent table


Recommended Posts

  • Newbies

Apologies for this very simple question but I cannot find any explanation of this concept.

In a situation where there are 2 related tables, am I correct in assuming that if a new record is created in the parent table then a record is automatically created in the related child table?

I'm trying to understand how creating relationships between tables actually works when records are created.

Apologies once again for my ignorance.

Link to comment
Share on other sites

The only time a child record is created from the context the parent records is if the relationship has the allow creation of related records enabled and you either script or have a portal and enter a value in any field in the related table. 

If you set field in a script it will only ever create one related record to create subsequent children records you would need to have a portal on the layout and go to the last row of the portal and populate a field. 

Also if you are on the Parent record with a portal to related records and you create a new Parent record and then proceed to create 5 children records by adding rows to a portal, if you have not 'committed' your record (by clicking in the background) you can use the "REVERT RECORD" menu or script option the will remove all of the related records and the parent. This specific behavior is used extensively in a transactional model where it's all or nothing. 

 

Link to comment
Share on other sites

43 minutes ago, SteveC405 said:

am I correct in assuming that if a new record is created in the parent table then a record is automatically created in the related child table?

No. A related child record will be created automatically when you enter data into a field of the child table (typically in a portal) - provided that the relationship is defined to allow creation of records on the child side.

---
P.S. Are you really running v.11 on Big Sur? I don't think that's workable.

 

Link to comment
Share on other sites

  • Newbies

Thank you very much for taking the time to reply to my post - your explanations were very helpful.

You're correct its v19 i'm running  - my typing is as flawed as my understanding of relational databases!

 

Link to comment
Share on other sites

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.