To fill the container fields I drug and dropped files onto the container fields.
That is the equivalent of using Insert Object from the Insert Menu and relies on Windows OLE (object linking and embedding technology).
If there's a chance some of the containers have had files or pictures inserted into them from the Insert Picture or Insert File options, using the "store a reference" option, you can add a calcualtion field to your layout to check.
Define a calculation field cContainerText, and set it to return text as it's return type. Enter the name of your container field as the calculation's sole term in it's expression. Place this field next to yoru container field and size it to be fairly large.
Items inserted as objects will show a ? in this field. Files or pictures inserted by refrence will show multiple lines of text that includes the file path to the file's location.
Ok, I've done that. Now all the container fields that have objects in them show ? so why am I gettting an OLE error of 0x80080005 ?
Can you give me some suggestions on how to fix this problem? I'm not assuming that you can fix my actual problem since I haven't given enough details. Could this be a configuration issue on some of the computers? Thanks. Phil you have been a great help already.
Did you select text as the calculation field's return type?
Exactly when/how do you get this error message?
I have a file where I test out issues with container fields where I have exactly this type of calculation field in place so that I can see and work out ways to manipulate the text stored in/with a file in a container field so I know that this works on my XP system.
The container field is called "ContainerField" and my calculation filed, TextofContRef is defined with:
as it's sole calculation term. And "Text" was selected in the "calculation result is" drop down in the lower left corner of the Specify Calculation dialog.
When I drag and drop a file from my desk top onto ContainerField, TextContRef returns a ? as expected.
Phil, here is the issue.
Database is served on a FMP 10 Server.
User 1 - (me) Can access this file on the internal network. Can access file from external to the network via VPN connection
User 2 - (internal employee) - same results as user 1 and has same network permissions
User 3 - (contractor) - has VPN access permissions but logs into laptop computer as another domain user. They can access the database same as User 1 and 2 but get the OLE error.
Note: I have admin rights to the database. User 2 has standard access. (FMP Priviledge Set: Data Entry only) User 3 has same access as user 2. I'm not using external authentication. All users setup as user 3 seem to have this problem. The files in question are PDF files and all clients except mine are Filemaker Pro. I have the Advanced version.
Phil is there any other information you need?
None of that answered my question.
The access permissions have nothing to do with the user's ability or inability to open the file inserted as an object as long as the user's privilege set permits access to the container field.
The issue that trips up users with container fields is that the file path from the user's computer to the referenced file must be exactly the same for all users and they must have "mounted" that shared directory (where the inserted files are stored) consistent to the file path in that field. I've worked with inserted files and pictures that were stored by reference rather than inserted objects but must assume that the principle is the same here. If a user does not have direct access to the inserted file, the OLE link to it is invalid and you'll get an error.
If you want to change how a given file is inserted, you should be able to use export field contents to export the file, then use the desired insert method to re-insert it. This is one way you can use FileMaker to move a file from one location to another and/or to change how it is inserted. Developers often set up a layout with container field and a script that inserts a copy of the file into the container field and then the script exports the file to a shared directory on your server. (Doesn't have to be the web folder unless you are publishing to the web.) and re-inserts it with the store a reference option.
Whether you make any such change or not, if you can map the same exact drive letter to each user's computer, then set them all up with the same exact file path to the shared directory of inserted files that matches the filepath used when inserting those same images, all your users should be able to access the file whose reference (OLE or store a reference) has been inserted into the container field.
Phil, thanks for the detailed reply. I understand your last post but... I thought that if my calculated field returned a result of ? then that means that the OLE object is actually embedded in the Filemaker pro container field itself. So I shouldn't have to worry about the path at all.
To make matters worse. the orginal file was on the O: and in testing I removed the o: drive from my system. (Disconnected the connection) and I can still open the file in the container field. I do have a network location pointed to the same folder on the server that the O: is mapped to. The users that can't open the file have the same network connection. This network connection isn' mapped to a specific drive letter. Thanks for being patient with me.
When does the user get this error message? when they first access the layout with this container field or when they double click the field to open the file?
The file type could be an issue here. If, for example, the file is an MS Word file, and the user does not have MS Word installed, there's no way for OLE to open the file and this might well affect the system's ability to display the file contents in the container as well.
They get it when they double click on the container containing the file. The file is a PDF. I would assume that the contractor's IT department would have loaded Acrobat Reader at least.
In fact, I seem to recall that one user had reader launch but it (acrobat) displayed a dialog box. that was waiting for a user selection. Do you think that might have caused this issue?
I don't know. Like you, I would assume that a PDF would open on nearly any system these days. However, I have seen cases where a PDF created on one system could not be opened on another for a variety of reasons.
You might trying exporting the file using export field contents on the machine where you don't get this error message and then try copying the file to the other machines where they get an error message and see if they can open the PDF directly (without using the copy in the container field).
If you get an error message or a dialog box popping up when they try to open the PDF in each case where they are getting an error message when they double click the same file in it's container field, you'll have your answer.
Do you have a script that I can modify that will export field contents. In researching this issue today. I've created a script that I modified from the forums here and I get this error "Container fields cannot be exported."
See this forum post. "http://forums.filemaker.com/posts/80c1cb1b6c"
Set Variable [ $Filepath; Value:Case ( Abs ( Get ( SystemPlatform )) = 1; "filemac:"; "filewin:" ) & Get ( TemporaryPath ) & "fm_file.pdf" ]
Export Field Contents [ ContainerTest::containerField; “$Filepath”; Automatically open ]"
Is the script steps that I used. and I get the error mentioned above. My concern with this script is the name of the file at the end of the variable. I figured as long as the filename ended in pdf (since it was the type of file I'm exporting) I would be ok.
My tests match yours that export field contents does not work with embedded objects. I thought it might be a file type issue but not by what my tests revealed on this end.
I do find that I can use Go To field [Select/Perform] to open the object, and then you could certainly save a copy of the file, but doing that for every such file in your container fields could be a really long process...
Well, darn the whole purpose of the container field was to store the file in the database so it could be easily found. Well back to drawing board. Thanks for your assistance. At least I learned how to determine if a container contains a link or an actual file. Your help is greatly appreciated. Thanks.