Create new records via one line portal
Creating new records in a child table from a parent record is, in my opinion, most easily done via a portal. Is there a way to create a one line portal that only shows the a blank line (in which to create the new record)?
I tried creating a new table occurrence of the child table. Primary key = foreign key AND Field A = Field B where fields A and B never match. I created a one line portal and was able to create new records in the child table. However the foreign key was not populated with the parent table's primary key.
Any ideas? Thanks!
Edit: No wait- it does work (I was looking at the wrong key). So is this a safe method to use?
Edit: It works but the match field on the parent side needs to change after each new record. So I have a script trigger on the pop when it exits to change the match field using
get uuid (I changed it to simply add one to the match field which is set to 1 on the parent record's creation). Still- this one script trigger seems simpler (and better performing?) than the alternative copy key- go to layout- new record routine. Though I'm still worried that there's something 'not quite right' about doing it this way.
I should add it's a one line portal, but it's transparent and takes up the whole pop up menu. So to the user, it just seems like they are creating a record on the child table.