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.

Retrieving cell values without using a layout...

Featured Replies

  • Newbies

I am having problems retrieving values from a table unless I am displaying a layout in FileMaker containing the fields (or table - I am not sure which...)

For example, when I have a table containing the following records:

Table: Manuals

ManualID     ManualName      Language

0001         First manual    EN

0002         Second manual   EN

0003         First manual    DE

0004         Second manual   DE



and I want to get every manual with Language="EN", I use the following AppleScript to get the IDs (not the ManualID) of those records:


--Get a reference to the table I am using

tell application "FileMaker Pro" to set manualTable to (first table where name is "Manuals") as reference

set theLanguage to "EN"



-- Get every manual with the set language

tell application "FileMaker Pro"

  set theManuals to (ID of every record of manualTable where (cell "Language" = theLanguage)) as list

end tell

This script usually works fine, but if I change "theLanguage" to "DE", the variable "theManuals" is usually undefined/empty unless the layout "Manuals" (containing all fields in the table "Manuals") happens to be displayed in FileMaker.

I can fix this by adding the line "show layout "Manuals"" before retrieving the records, but I thought that by accessing the tables directly it would be unneccessary to involve flipping layouts and windows in FileMaker when accessing the databases.

Any pointers to where I am screwing things up would be appreciated.

I'm not an AppleScript guru, but the mistakes I typically make with it have to do with context/scope. Are you missing an "end tell" after the set theLanguage step, or did you snip out some code?

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.