File name to FileMaker

I was once told that AppleScript is a read-only language and after much caffeine and gnashing of teeth this morning, I do not disagree at all. All I want to do is paste the name of a selected file into a FileMaker database. Sounds easy, right? Here’s the syntax:

tell application "Finder"
	set theFile to selection
	set TheName to name of (theFile as alias)
end tell
tell application "FileMaker Pro Advanced"
	go to database "Test_Import"
	go to layout "Test_Import"
	set data field "i_file_name" to TheName
	do script "Import Excel file"
end tell

Leave a Reply

Your email address will not be published. Required fields are marked *