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.

What's the difference in this code

Featured Replies

While my knowledge of AppleScript is limited, how it works with Filemaker is even more so.

I'm trying to get certain values into a field and I've come across a few different ways to do it.

1 - set the cell "fieldA" of record 1 of database 1 to (varA as text)

2 - set the field "fieldA" to varA as text

3 - set the cell "fieldA" of current record to (varA as text)

They seem to do the same thing. But I've noticed that when I'm using it in a FM Script from calc field, example 1 cause the FM Script to basically skip over the AppleScript, 2 only works on my machine and not my client's, and 3 I have yet to test on my client's but work fine on mine.

Is there some official logic to all this?

Hey Chris,

1. sets the first record of the found set

2. set all records of the found set

3. sets the current record

Aint it it great?

Regards.

Ernst.

Be very careful with number 2. That could set fieldA in *all* records at once, not just in one record.

As you have noticed, there are a lot of subtle differences in how different syntaxes behave. Sometimes they behave the same way, and at other times differently. If you are calling an applescript from outside Filemaker, and the target database is not open, then "current record" won't have any meaning, and it will probably default to record 1. If you have several databases open, and don't specify a target database, then the frontmost one will be used. So, it's important to specify a database and a record.

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.