Anybody who has any idea on what's causing this??
I did some testing and found out the problem exists only when I drag a pdf to the container field on OS X.:
- It adds the .pdf file to the external storage
- it adds a .png file of the .pdf file to the external storage
- it adds a .jpg file of the .pdf file to the external storage
When I use 'insert file' to insert a pdf to the container, it works perfectly and only adds the .pdf file to the external storage.
On windows computers both drag and drop and 'insert file' work the same, perfectly.
So how can we fix the drag and drop on Mac computers??
I have an idea that may help you diagnose this:
Define an unstored calculation field with this expression:
Getastext ( yourContainerfieldHere )
Put this calculation field right next to your container field and size it large enough to see multiple lines of text. Now test your various methods of inserting files and on both platforms. Look at the actual file path data returned in this calculation field and see if you can spot what difference in the text might be resulting in an invalid file path or file name.
Did what you said and here are the results.
For a correct working document:
remote:NADG - 15712 Coyle - Promissory Note and Mortgage.pdf
FILE:Purchase Documents/NADG - 15712 Coyle - Promissory Note and Mortgage_1.pdf
For a document that cannot export:
remote:NADG - 19964 Packard - Promissory Note and Mortgage.pdf
JPEG:Purchase Documents/NADG - 19964 Packard - Promissory Note and Mortgage.jpg
PDF :Purchase Documents/NADG - 19964 Packard - Promissory Note and Mortgage.pdf
PNGf:Purchase Documents/NADG - 19964 Packard - Promissory Note and Mortgage.png
Note the extra info with the second! I don't even want FM to make a jpg or png, any clues?
Anybody any clues on what's going on here?
If you need more info from my side I'll happily provide it asap!
I've never seen the text from a container field look like that. Usually, the .png and .jpg references are to thumbnails, but I've not seen them listed in the container field like that.
If you are using FileMaker 13 or later. Try using GetContainerAttribute to extract the file name and see what you get.
Thanks for the reply, using this:
GetContainerAttribute ( PurchaseDocuments::Document; "filename" )
gets me this result:
TW - Allen Pointe Dr 9964 Unit 47 - Buy HUD both sigs.pdf
Seems pretty normal right?
My existing calculation for the $path variable in my export field contents script is this:
Get (TemporaryPath) & Right(filename; Length(filename)-
Note the GetAsText, should I replace this with the GetContainerAttribute?
I did as I suggested and it works flawlessly again! Thanks Phil! noteworthy to know that the GetAsText does not work in my situation, I might not be the only one!
I suggested GetAsText as a way to see what data is actually in the container field as a way to see why your calculation was not succeeding in extracting a file name. The aim would have been to adjust the calculation in order to correct extract the file name, not to use getastext to get the file name.
But when your thread popped back up, I recalled that there is now an easier way to get file names from container fields and thus suggested that approach. I was also curious to see if the filename returned was for a PDF or a different file type.
Sorry, I meant to aim at my original script that used GetAsText, I recall I found the code for that script somewhere on these forums. it worked previously but with FM13+ it's not working anymore.
So if you encounter anything similar here in the future, you know what the issue is (-: Guess I won't be the only one using that script.
Thanks for fixing this Phil!