Looks like no one’s replied in a while. To start the conversation again, simply ask a new question.

applescript and filemaker pro/field access

To anybody that can help.


I am attempting to get applescript pull some data from Filemaker Pro 11.


Specifically, I am trying to get data from a known field "PackitName"



I don't get any errors, yet, I do not get any data either. The result is empty as is told by by the display dialog step.


The Database is already open, active and to the correct layout and correct record (short cuts for now). (If I don't have the database open, or active) I do get an error.

So, my script sees the field/cell just does not pull data from it.


I will work the nuances of the opening the database/ finding the correct record later.


Thank you dearly for any help!


Chris


property the_path : "/Users/chrislund/Dropbox/~BBC/IDG Jobs"

set the_folder to (POSIX filethe_path) as alias

tell application "Finder"


activate

if front Finder windowexists then

set target of front Finder window to the_folder

else


openthe_folder

end if

end tell


tell application "FileMaker Pro"


activate

set JobName to (get cellValue of cell "PackitName")

end tell


display dialogJobName


tell application "Finder"


makenewfolderatthe_folderwith properties {name:JobName}

end tell

iMac (27-inch Mid 2011), OS X Mountain Lion (10.8.5), FileMaker Pro 11

Posted on Apr 27, 2015 6:53 PM

Reply
Question marked as Best reply

Posted on Apr 28, 2015 8:51 AM

It's been a while since I've scripted Filemaker Pro, but the only thing that stands out in your script is the vagueness of the 'get cellValue...' command.


You usually have to be more explicit than that, such as '... cellValue of cell "PackitName" of current record' so that it knows specifically which cell you're looking for. This might not be the issue since I'd expect that to throw an error rather than return an empty value, but it can't hurt to try.

5 replies
Question marked as Best reply

Apr 28, 2015 8:51 AM in response to neurascenic2

It's been a while since I've scripted Filemaker Pro, but the only thing that stands out in your script is the vagueness of the 'get cellValue...' command.


You usually have to be more explicit than that, such as '... cellValue of cell "PackitName" of current record' so that it knows specifically which cell you're looking for. This might not be the issue since I'd expect that to throw an error rather than return an empty value, but it can't hurt to try.

Apr 28, 2015 8:12 AM in response to neurascenic2

Hi,


neurascenic2 wrote:


Camelot, I tried that, now I do get an error


(Cant make "PakitName" into type integer.)


with the line of code

set JobName to (get cellValue of cell "PackitName" of "current record")


What I have in the cell is definitely text.


The current record term should not be used as string, try this


tell application "FileMaker Pro"
  activate
  set JobName to (get cell "PackitName" of current record) 
end tell

applescript and filemaker pro/field access

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple ID.