All functions that end in "values" return text with a return as the last character and that is producing an impossible file name in your calculation as you get that return character followed by ".PDF"
Thanks for responding. Yes, I figured that out early on and thought I would do everyone a favor by leaving out my "substitute" function that stripped the carriage return. (Bad idea.) My actual $path variable looks like this...
"file:/C:/Program Files/FileMaker/FileMaker Server/Data/Databases/RC_Data_FMS/Global DB/Files/Prepress/EST_Estimates/pdfContainer/" & "Estimate " & Substitute ( MiddleValues ( Get(ScriptParameter ) ; 6 ; 1 ) ; ¶ ; "" ) & ".pdf"
And as I say, it doesn't work. The resulting emails are empty, no attachment.
For a simpler expression, I'd use:
GetValue ( Get(ScriptParameter ) ; 6 )
This would eliminate the need for using Substitute as GetValue doesn't append that dratted return character.
But that won't solve the immediate problem.
I'd try this, If you can, go directly to the server computer such as via Remote Desktop. Open a local database with a container field in it directly on the Server computer and use Insert File to insert one of these files into the container field using the "by reference" option. Then use GetAsText ( YourTable::yourContainerField ) in the data viewer and compare the file path thus produced to the one produced by your calculation and look for any discrepancies.
You might also move a copy of your file into the server computer's documents folder and then test the following calculated file path to see if it works:
Get ( DocumentsPath ) & "Estimate " & GetValue ( Get(ScriptParameter ) ; 6 ) & ".pdf"
If that works, you know that the file path to the left of "Estimate" has a problem. If this new path still does not work, you know that the part starting with "Estimate" isn't working for you.