I don't get your formula. Apparently you are trying to comment the first part out, but how far does that comment out go? Try putting the $filepath into the dataviewer and test the results.
Snow Leopard.... not officially supported anymore. Hopefully this is a test or development system and not production.
I can't think of any resaon why this would happen, and I just made a script as per your description and run it a number of times with so far no slip ups. Just one thing I would recommend: in the last part of your filename variable you have a space before the .pdf (& Purchase Orders Newv2::Supplier Name & " " & ".pdf"); I suggest you drop that.
So what next? … Is there any pattern to this behaviour? Does it happen on some records and not others? Try running the script several times over on the same test record to see if the behaviour changes. Try using a different layout. Try the same script in a test file. Whatever test you can think of to try and make it happen. Then when it does, try and work out what was different.
Ok, I remove the " " .Unfortunately it made no difference. I cannot detect any pattern to this behavior, at first I thought
maybe the supplier name was too long, maybe it ran out of space? But, even with short supplier names the .pdf would
not show up on the icon.
What I did find interesting was that, on certain "supplier names" the .pdf would consistently show up? Strange huh?
"Show all filename extensions" was already selected on the finder.
I was reading on another discussion the "Save records as pdf " was created(?) by Adobe.
Could this be an issue with Acrobat?