On the Relationship Graph (File>Manage>Database…>Relationships), edit the relationship between your Layout Table Occurrence and the Portal Table Occurrence. Uncheck the box labelled "Allow creation of records in this table via this relationship".
Check the related table. It looks to me as if you have a *blank* related record to the main table - one without an image - thus the record is showing as an extra.
Solved the issue.
I just have to see if "create new record via this relationship" was needed for anything
AFAIK, it's only used to allow the addition of new records to the table using the last line in the portal without switching layouts.
AFAIK ?? --- as for ???? ????? ????
however, yes I went through my script steps and did wonder why that checkbox was ticked.
I have done this a few times in my solution and am now correcting this error.
(it has been a working "work in progress" for many years)
You're welcome, Michael
"as far as i know…"
Good Luck with it!