Note: I haven't touched an AppleScript in many, many years...
What kind of data is in theFilePath? Is this text?
I don't know if AS can set a container field to text or not, but if it can (I can do it with a FileMaker script), it must be formatted in the form that is required for a FileMaker Container field. You may want to see this thread to learn more about how that thread might need to be formatted: Exploring the use of a $Path Variable in Scripts
And I have to wonder why you want to use AppleScript for this as it appears that your script simply opens a dialog for inserting a reference to a file into a container field--something that is easily scripted with a FileMaker script and thus the AS would not be needed.
I'm giving you a very small part of my overall goal, and I have lots of reasons for using applescript that aren't relevant to this forum.
Thanks for the links, I'll read them closely.