Start with this relationship for your portal:
Contacts::anyfield x Contacts 2::anyfield
the x operator will match any record in Contacts to all records in contacts 2.
Then you can set up your row of portal fields as a button that performs a script that uses either Go To Related Records or performs a find on Contacts to pull up the record in your found set that you want to show in the detail box.
Conditional formatting can change the fill color of your portal row of fields to show which contact is selected for the detail view.
Note: to preserve your portal's scroll bar position, you may need to use related fields for the detail view table and your script would then update a key field in your layout's table (which no longer need be based on contacts), to link to and display that detail record with out switching to a different record in contacts (which keeps the scroll bar from snapping back up to the top.)
Awesome works great i appreciate the tips, could I use a global field for the detailed fields that are updated anytime a new record is selected?
I'd use a global field for the relationship on which the detail view fields are based. That moves less data here and allows the user to edit the detail view fields directly--which wouldn't work well if you copied the data into the globla field.
In other words, you'd define an auto-entered serial number in your contacts table if you don't already have one, then set up this relationship:
LayoutTable::GlobalIDField = DetailView::ContactIDField
Your script that performs when a portal row is clicked would look like this:
Set Field [LayoutTable::GlobalIDField ; PortalTableOccurrence::ContactIDField ]
Then your conditional format expression to highlight the portal fields might be:
LayoutTable::GlobalIDField = PortalTableOccurrence::ContactIDField