I found a way to accomplish this but have reservations about the answer:
In the child table, field fk_parentID - I set the field to a calculated value that = 1. Works fine but if the parent table record is ever changed and does not = 1, the solution will not work. Yes there will always be only 1 record in the parent table... Is there a script or some other method that I can pick a singular ID in the parent table?
1 of 1 people found this helpful
The Parent table will always contain only 1 single record.
I have created a separate layout (list view) for the Child records. When I create a new child record in this layout I want to populate the field fk_parentID with the ID of the Parent table, field PK_parent ID.
I don't want to use a portal for reasons that relate to layout functionality shortcomings.
Usually when you go from a parent record to the children record(s) you will store that Parent PK in a variable or global field somewhere and manually populate that to any new child records via a script or calculated value as you have.
Unless the layout has some context (e.g. viewing a parent record and showing children in a portal) you will need to store that context and manually enter it as you have. Controlling the UI flow is what makes this out-of-context stuff work.
Here's another way you may be able to adapt. Look at the sample file about 3 posts down:
Although it says you're adding a portal row, you are actually making a new related record.