You could set up a text field in the layout's current record that is referenced in the portal's portal filter. Clicking a portal row button could append the portal record's primary key to a list of the same in that field and then commit records.
Set Field [LayoutTable::ListField ; List ( LayoutTable::LIstField ; PortalTable::PrimaryKey ) ) ]
would append the PK to the list.
IsEmpty ( FilterValues ( LayoutTable::ListField ; PortalTable::PrimaryKey ) )
would work as the portal filter.
To return the portal records to view, just clear the ListField.