FileMaker Pro problem

Hi

I’m evaluating FMP to see if we want to use for our DAM stuff and I’m having a problem getting data into it via AS. Here’s my code:

tell application “FileMaker Pro”
tell front document
create new record
set recordCount to count of every record
set thisRecord to "record " & recordCount
set cell 1 of thisRecord to thisFile
end tell
end tell

where thisFile is just the file name of a file I am manipulating in PS through a subroutine. I get the following error message:

Can’t set <> 1 of record 3 to (VARIABLE VALUE). I have also tried set cellValue of to no avail. I’m hoping that I am just overlooking something pretty simple here. Any help would be appreciated.

Regards

Steve

You can simplify your code to…

tell application “FileMaker Pro”
tell front document
set thisRecord to create new record
set cell 1 of thisRecord to thisFile
end tell
end tell

You need to match the class of the data you are setting to the field type. Some coersion are allowed, but obviously there are limitations. What type of field is cell 1 and what is the class of the variable thisFile?

Thanks John I’ll give that a try. Cell 1 is a text field and I am passing a string to it - specifically a string that will look something like this “AA010104_IL_heartdisease.tif”