What you describe should do the job, but you might sort your portal records to put the most recently added portal record into the top of the portal. You can sort in descending order on an auto-entered serial number or a timestamp field that auto-enters the creation time stamp. And you can remove the "create" option from your relationship as you don't need it.
If you don't want to change layouts, there's another option that is well documented and easy to find if you web search for it. Look up "MagicKey". This option would use a relationship between a global field in your parent table and a second occurrence of the related table with the "create" option enabled. You can then use Set Field to create the new portal record without changing layouts. This has the advantage of not changing any of the focus setting on the current layout and avoids the chance of tripping a script trigger when you exit/enter layouts and such. I haven't provided all of the details here, so go do a web search to find the rest.
The 'pivot' method ( 'magic key') is preferable to change layout/create/record/return, or setting up a multi-predicate key for a dedicated allow creation related record relationship
1. it is faster
2. it avoids screen flicker under windows
3. a single g_pivot_id global field can be used for 'all' new related record requirements
4. no need to calculate a unique left key
5. it avoids an implicit commit on change layout
There is a demo on Nightwing site.
Also my simple demo attached.
The method is seen by some apparently as one of these SFT ( stupid FileMaker Tricks), and like numerous things just because you can, does not mean you should. But in this case, you should.
It has been clearly stated, by authorities I certainly trust, that the behaviour that permits the method is not going away any time soon.
I have been using it since a master class last year, and it has been enormously beneficial. Up there with popovers in my book.
pivot_demo.fmp12.zip 68.7 K