Odd Script Error from FileMaker Pro 10

I have a script to dump info from one of my FileMaker DBs, with a tell block like this:


tell database "myDB"
set nRecords to count records
repeat with recno from 1 to nRecords
set curData to get data cell "dataCell" of record recno
set exportString to exportString & curData
end repeat
end tell

i get an “Object not found” error on the “get data cell” line even though I can verify that the cell is present in the current layout and contains data when the script is being run. any other reason why AS might throw this error?

I usually tell the app, then the window, then the layout. The field has to be on the layout.

tell application “FileMaker Pro Advanced”
tell window “variable_relations” – database file name
tell layout “Table1” – name of layout
set nRecords to count records → found records
set exportString to “”

		repeat with recno from 1 to nRecords
			set curData to get data cell "field1" of record recno
			set exportString to exportString & curData & (return) -- added a CR
		end repeat
		
		
	end tell
end tell

end tell
return exportString → list of the cell values in the found set

Model: MacPro1,1
Browser: Safari 531.21.10
Operating System: Mac OS X (10.6)