So what exactly is your question?
How do I duplicate a portal record and keep the duplicate in the related portal. Sorry I wasn't clear lol. It was very clear in my mind.
You could make a simple script, like this:
Set Variable [ $id ; PortalTable::PrimaryKey ]
Enter Find Mode [ no pause ]
Go To Layout [ PortalTable ]
Set Field [ PortalTable::PrimaryKey ; "==" & $id ]
Go To Layout [ Original Layout ]
Refresh Portal [ PortalObjectName ]
Essentially that script grabs a variable of which record to copy, goes to that table's layout and finds that record, duplicates it, and then returns to the original layout where it refreshes the portal.
the layout is based on a "PAF" table but you are setting a field from a table called "northern stars"
Lines 3 goes to a layout that is based on the table occurrence 'PAF', as you can see from the name in parentheses.
But in line 4 you are writing into a field that comes from the table occurrence 'Northern Stars'.
That doesn't necessarily have to be wrong (this *is* a relational database system), but in this case, you're searching by primary key, so I hazard the field to be set should be PAF::nameOfPrimaryKey.
Once you got that working, you could grab the primary key of the new record, return to the layout, go to the portal, and loop to find the new related record in the portal.
Is the button that runs that script inside of the portal itself? it should be on each portal row so you can choose which one to duplicate.
What does the relationship between Northern Stars and PAF look like?
See the fork on the connector your relationship diagram? It looks like the relationship is backwards from how you've described it.
The relationship is set so each PAF record has many Northern Stars records.
Make sure the fields relating it are the same type (EG number, text).
Also, are these both table occurrences?
It is working!! I had changed the layout of my db and had the relationship set up wrong!! Thanks for your help and enjoy your long vacation
See my last post. You are exactly correct! Thanks for all of your help Mike!