Jump to content

Error with "set data cell"


This topic is 6530 days old. Please don't post here. Open a new topic instead.

Recommended Posts

FMP8 returns the error "Object not found" for every variation of this simple AppleScript:

tell application "FileMaker Pro Advanced"

set MyText to "Cryptonomicon"

set data cell "Book" of current record to MyText

end tell

The current table is named "Global", and the current record contains the global field "Book". I've tried "Global:Book" and everything I can think of, but get the same error no matter what.

Any ideas?

Link to comment
Share on other sites

It works for me, IF the field is on the current layout; otherwise not. It might be better to include the table (table occurrence) name. Then it doesn't care if the field's not on the current layout, or even table. Also, global fields do not need the "current record", as they are the same for all records; easier.

tell application "FileMaker Pro Advanced"

set MyText to "Cryptonomicon"

set cell "Book" of table "Global" to MyText

end tell

Link to comment
Share on other sites

I solved it. The script was asking FM to change the value of a field in a record. But there was no record.

I was using a simple layout populated with just 2 fields, but... they were both global. If there is no non-global field on a layout, FM doesn't recognize it as a record EVEN IF VALUES ARE RECORDED for the fields on that layout! Even "new record" fails. You can't create a record if you don't have at least one non-global field.

Link to comment
Share on other sites

This topic is 6530 days old. Please don't post here. Open a new topic instead.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.