I am trying to achieve a fairly easy task: To make applescript open a “find-folder”-dialog and then save the folder in a field in filemaker - but it doesnt happen. I get an error mess and its starting to annoy me
The code looks as follows:
tell me
tell database "arbeten.dss"
choose folder with prompt "Välj mapp"
set cell "ExportMapp" of current record to the result
end tell
end tell
I’ve tried several versions of the code, and all of them generates an error message. Would appreciate help - if there is any to give
tell me
tell document “arbeten.dss”
choose folder with prompt “Välj mapp”
set cell “ExportMapp” of current record to the result as string
end tell
end tell
The “database” is the database as a whole. The “document” is the found set of records. The “current record” is part of the document. You can also use “window”, as in “window 1”, which is useful if you’re running from inside a FileMaker script.
Why the “.dss” extension? That seems odd.
If this is for FileMaker 7 you’d have to be on the layout you want, unless you specify which explicitly in your script. In earlier versions it’s not so critical; you can use “layout 0” (which no longer exists in 7, due to the multi-table per file structure).
Thanks - works excellent. The choice to use .dss as an extension comes from the creators of the database. Guess they thought it looked more professional to have an extension of their own
It is probably a “runtime” file, which means it was created along with a runtime engine, by FileMaker Developer. As far as the document file itself, it doesn’t much matter. It’s still a “FileMaker” file, in almost all ways. But if double-clicked it will try to launch its runtime application, not FileMaker.
If it is a runtime environment, then you would address the runtime engine (whatever its name) rather than the FileMaker application, for commands like “activate.”