"( And what did I leave out in describing this?)"
describing your portal relationship and whether "allow creation of records via this relationship" is enabled for the portal side of the relationship would help.
Posting your scripts that attempt to log records in this related table would help also.
From your description, I think you are attempting to create a related record with a script step like this:
Set Field [History::Field ; Expression]
From your Parent table's layout.
But I could be wrong.
If that's what you are trying to do, it works either once or not at all depending on whether you've enabled the above "allow creation..." option. Outside of a portal this creates a new record if there are no related records for the current parent record if the "allow creation..." option is enabled. IF there are related records, this step attempts to modify the first such related record and thus fails to create a new related record.
If you don't select the "allow creation... " option, nothing at all happens.
You have two main choices:
- Interact with your related records through the portal by entering text in the bottom blank row of the portal with the "Allow creation" option enabled--this can be by hand or in a script.
- Use a script that creates a new record in the history table and also assigns it the necessary matching value from the parent record:
Set Variable [$ID ; MainTable:: PrimaryKeyField]
Go To Layout [PortalTableLayout]
Set Field [PortalTable::ForeignKeyField ; $ID]
(You can add more set field instructions to load your new record with data as needed.)
Thanks for your patience and willingness to help. The script I used was nearly identical to what you suggested in (2). I will sort through other parts of your reply and get you more information later when I am back at my dayjob desk. Thanks again!