Go to Manage > Databases > Relationships
On the TO in question, double click the relationship box and under the field names will be a check box with the following "Allow creation of records in this table via this relationship." Uncheck the the check box. Close and Save.
Bumper, thanks very much for the response, but this is not quite what I mean. I do want the user to be able to create new records within the portal, but I do not want the "empty" record to create itself once the user has committed the most recently created record in the portal (this is the default behavior). What I would like to do -if it is possible- is only have a new empty record create itself when the user wants it, by triggering a "create new portal row" script with a button.
The reason for all this is that in the solution, the user has a very tall, single-row portal in which to view one record at a time. It is less intuitive for the user to have the record automatically create itself, then have to scroll down to see a new record and start typing in it.
Ah, sorry I misread.
A script will do the trick. Make a button on the Parent layout and attach this script to it.
There are a number of custom functions to accomplish this, but it is easy enough to do in basic FMP. This presumes you already have a Parent/Child (portal) lauyout set up and they are related by the Parent_ID to the ParentID_fk. The basic steps are:
1. Create a variable and set it to the primary key of the Parent record.
Set variable ($id, Value: Parent::ID
2. Go to the related layout of the Child table (portal)
Go to Layout ["Child", (Child)]
3. Create a new record.
4. Set the Parent foreign key with a Set Field of the Variable.
Set Field [Child::ParentID_fk; $id]
5. Return to the original Parent layout so the user can enter data in the new portal row.
Go to Layout [original layout]
This is just the basic skeleton script, but it gets the job done.
Thanks, Bumper, that's a great idea, and this helps me a great deal. I think I will add "freeze" to the top of the script so the user doesn't see all the going back and forth.