Jump to content
View in the app

A better way to browse. Learn more.

FMForums.com

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

AppleScript finds on calculated fields error out

Featured Replies

  • Newbies

Recently upgraded to FM 7 (version 7.0v2) from FM 6 and a script that I use every three months stopped working. Traced the problem to FM Pro error when AppleScript tries to set a value for a find request on a calculated field. Got error "write access denied" every time. Non-calculated fields work fine, and I tried every permissions/access type of fix that I could think of. I actually called FM tech support, which was non-helpful. My work around was to create a new field with looked up value from the calculated field using a self relationship. Seems a tad kludgy.

I saw one other post that mentioned the issue, but also several other problems so the answer wasn't clear.

Is this a bug in FM 7 or a "feature" of some kind? Anybody else running into this issue?

1. It is a lot easier to answer script questions if we can see your script.

2. FM7 is way different from FM6 because the data structure is different. For instance

Get field "FirstName" of current record of database "Contacts.fp5" made sense.

Get field "FirstName" of current record of database "Contacts.fp7" does NOT.

There is no such thing as a current record in in a Filemaker 7 database.

There is a current record in *a particular layout* of *a particular window* of a Filemaker 7 database.

Same goes for find requests.

  • Author
  • Newbies

The AppleScript step that stopped working was 'set cell "NewExtension" of request 2 to 0'. The field "NewExtension" is a calculated field. FileMaker returned a "write access denied" error every time it tried to do a find on a calculated field.

Here's a longer snippet of the section of the script:

go to layout "Sales Info"

create request

delete every request

create request

set cell "Line Items to Products Relationship::Producer" of request 1 to theItem as string

set cell "Date" of request 1 to theDateRange

create request

set cell "NewExtensionLookUp" of request 2 to 0

set omitted of request 2 to true

find 

I can post the entire script if you want. Basically, AppleScript steps through each item in "theList" and tells FileMaker to perform a find for each of the items within a specified date range, then calls a FileMaker script to print a report for each of the 50 items. Not a real big deal.

My first post was more of a comment than a question, considering I found a work around. I was just wondering if this was an intentional feature, a bug, or an error in my original script and I also wanted to post something that other users might find helpful. Thanks!

There are several problems with what you've shown of your script, so it's an error in your script. The best thing would probably be to post an example file that we can look at.

I get the same results, even with a dead simple AppleScript.

Find.zip

Well I spoke too soon. You're right. Can't make it work. I'm filing a bug report. Actually I'm *trying* to file a bug report but the Filemaker problem report page isn't working, it fails when you try to submit.

Create an account or sign in to comment

Important Information

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

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.