How can you view a document that you have place in the container field to pop up in a new window? If that make any sense.
Create a layout with the container field as the only object in the body (delete header and footer areas). Set the container field object to expand every direction and make sure it's the full size of the layout.
Write a script that opens a window, resizes it to whatever you need, hides toolbars, and goes to that new layout. As long as you're on the same table you'll just stay on the same record/container field.
You can then attach this script to a "preview" button.
... and, if you add a button to the new window layout which is set to close itself, you can then run the script to open that new window as a Modal window so it will stay front-most until the user is done with it.
Be sure you have the close button working before you make a new window into a modal window so you don't end of stuck on that screen.
Sorry it took me so long to get back. I have this container field in a portal. Each time a document comes in. It will be placed in a different container field. So wouldn't I attached the script to the container field if that makes sense?
If the container repeats in a portal, you would just need to add a "go to related record" script step as part of the popup script I described above.
So the script would look like:
go to related record (using layout described above)
resize window (to specifications you wish)
Okay..the script works.. The only issue is that the pdf file in the window doesn't open up to show the document. It shows the pdf file, but not in full readable form if that makes sense.
There is another issue..in the portal when I click on the container field in the next line that has no document in it. The script trigger is triggered due to the portal. What I'm trying to do is to be able to insert differnt files in a portal field where I can view the documents in another window.
in the inspector (ctrl+I) under the data tab, at the bottom there is a setting that allows you to enable interaction with the container. You need that checked to be able preview the document while in browse mode.
to the beginning of your popup script, add this error checking:
If [ IsEmpty(relatedtable::containerfield) ]
This will not activate the popup unless there is a document in the container field.
Mike that works..I think the major issue is the portal.. Due to the fact that I have this container field that duplicates itself, I cant put different documents in that same container field and have it open whatever document that has been placed in that field.. It will only open up the 1st document that I have in the field if that makes any sense.
assuming your related documents table has a primary key (which it SHOULD), you can add a find for the related record into the script.
set variable $id = relatedtable::primarykey
go to layout for relatedtable - full screen container
perform find (where primary key = $id)
Retrieving data ...