I would create another table for documents with a field for the parent tableID, it's own ID, the container, and any other fields you would want. Set up the relationshipt between the parent table and this child table with the allow creation of records in the child table. Then set up the portal to the document table with the fields you want to display. You can add buttons for delete portal row, that will delete the document record. Insert file, that targets the container to add the file. A button to export file with open after export option checked or send even to have it open the file.
The Known Bugs List database file: contains a delete portal row script you can import into your file error free. (The script does not have any file, layout or table specific references.) You are welcome to use this script for deleting your portal row records if you wish.
It uses a list of values passed as a script parameter to customize its behavior to a specific layout and portal in that layout, thus this one script can be used in all portals in your database system where you want to add a delete portal row functionality. It highlights the row to be deleted, displays a customized confirmation message in a dialog and then deletes the portal row record if the user confirms the deletion by clicking OK.
Thanks for the response.
You helped me very much: everything works fine.