February 15, 201015 yr Situation: I'm calling an applescript to create and save a new Word Document with a calculated filename. Now I would like to store this file (just the reference) directly to FM into a Container field. Problem: First I tried with FM script "Insert File" but I don't know how to define the source File, because the filename is based on a calculation Second thought was to store the reference with applescript but there is the same problem. any ideas? by ChiSao
February 17, 201015 yr Author I tried GetAsText(container) to export the path but I cant reimport this path into the container field. It doesn't work So is there really no possibility to write a reference into a container field? I can't believe this. Otherwise I have to use a normal field to store the path and a script trigger to open an apple scipt to open the file with an externel program (Word, Acrobat and so on) (much more complicated than the container field)
February 18, 201015 yr FIleMaker paths are not OS paths. I think you have to transform the path in your AppleScript from the FM path to a Mac OS path. I don't know this by head, but if you do some research you will find the way.
February 18, 201015 yr I tried GetAsText(container) to export the path but I cant reimport this path into the container field. It doesn't work Take one of the paths you get with GetAsText(container) (a relative or an absolute one) and use Set Field[container, thePath] where thePath is the text path in the correct format. You are assigning a bit of text to the container, but that's ok. It will work out.
March 2, 201015 yr Author So finally I found the solution. When writing a path to a container field it's important to have a "space" a the end of the path like: "filemac:/Macintosh HD/word.doc " the empty space after doc is important. Does someone know why?
Create an account or sign in to comment