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.

set cell does not work on calc fields

Featured Replies

I have the following script:

tell application "FileMaker Pro"

		go to layout layoutName of database databaseName

		show every record of database databaseName

		-- this should do the find, but for some reason, I cannot enter data into a calc field - even in a find request

		delete every request

		set myRequest to create request of layout layoutName 

		set cell mySearchField of myRequest to mySearchText

		find

end tell

For some reason, when mySearchField is a calculation field, I get a "Write permission denied" error in AppleScript. Even those if I get permission on the field it shows I have write permission. I can also manually search in this field on the layout that works. If I change it to a regular text field, it works fine.

I'm sure this worked in previous versions. Is there a reason why I cannot seem to search in a calc field using AppleScript?

Thanks.

Edited by Guest

Well searches have changed nature now we also have constrain found set etc. So the need to show all records initially makes no point any more, I would instead try something in the vicinity of:

tell application "FileMaker Pro Advanced"

set theSearchValue to 1

set theField to "Diff"

show (every record whose cell theField is theSearchValue)

end tell

Where theField is a calc'field ...here called "Diff"

--sd

Does it all have to be done through Applescript?

If most of it has to be written in Applescript, you can create a Filemaker Script named "Find Something" that does the following:

Enter Find Mode

set field "calc" to "4"

Perform Find

So your applescript would look like

tell application "FileMaker Pro Advanced"

tell window 1

go to layout "Main"

show every record

do script "Find Something"

end tell

end tell

OR

You can create a filemaker script that does the following:

Go to Layout [Layout Name]

Show All Records

Enter Find Mode

Set Field[ table::calc ; "4"]

Perform Find

is there a reason you're doing it all in Applescript?

  • Author

The reason I've done it in AppleScript is that the data comes from another application. I've managed to work around it by setting a global search field and then calling on FM to run a script to do the search.

But this used to work. Yes, the workaround works, but why should I have to use it? Searching in a calc field through AppleScript should be a perfectly reasonable thing to do. Ah well. Thanks for the replies.

In your consideration must the matching features from this:

http://www.filemaker.com/help/Script-Steps66.html

...be considered as well!

--sd

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.