The insertion method used and the container field's specified storage options can all affect exactly what text is actually stored as part of the data in the container field. In some cases, GetValue ( Container ; 1 ) returns the file name.
For a calculation designed to extract the file name from any container field except those populated by FileMaker 11/window's deprecated "insert object", see this thread and the exploration file that you can download that includes an example of this calculation: Exploring the use of a $Path Variable in Scripts
GetValue(Container;1) returns remote:"Filename.pdf"
How do I remove the remote from this so it just outputs the filename, the path I already specified in InsertPDF path/$filename
If you check out the thread I have suggested, you'll find a file with a calculation that handles that detail and many other potential pitfalls that can affect what is needed to extract that file name.