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.

Information does not get written on current record

Featured Replies

When running the AppleScript the first time a new record in the sdhcCARD table gets created and the cells ("_EmptyingSDHC", "_EjectSDHC") get updated correctly.

The next time the script is run a new record gets created, however the cells "_EmptyingSDHC", "_EjectSDHC" of the first record gets updated not the new one. Everything stays blank on the new record (i.e record #2).

If I run it again a third record gets created and the cells "_EmptyingSDHC", "_EjectSDHC" of the first record gets updated not the new one. Everything stays blank on the new record (i.e record #3).

I've tried using something like current record and it did not make any differences. I may had the syntax wrong.

Would someone have an idea why the cells on the new created would not get updated. Always the one contained on the first record get updated.

Many thanks!

Daniel

tell application "FileMaker Pro Advanced"

set newSDHCrec to create new record at table "sdhcCARD"

end tell

my setFMP("Completed", "Emptying SDHC", "Emptying SDHC card on computer", newSDHCrec)

my setFMP("Completed", "Eject SDHC", "Ejecting SDHC card from USB port", newSDHCrec)

on setFMP(Status, FMPstep, messageFMP, newSDHCrec)

tell application "FileMaker Pro Advanced"

if FMPstep = "Emptying SDHC" then

set data of cell "_EmptyingSDHC" of table "sdhcCARD" to Status

else if FMPstep = "Eject SDHC" then

set data cell "_EjectSDHC" of table "sdhcCARD" to Status

end if

end tell

  • Author

I keep trying different ways to solve my problem. I now get the error message "Object or property is the wrong type".

Unfortunately, I do not have enough experience in both FileMaker Pro and Applescript. I used to perform programming, however the old way i.e Cobol, PL/1.

Thanks for your precious help!

Daniel

tell application "FileMaker Pro Advanced"

set newSDHCrec to create new record at table "sdhcCARD"

end tell

my setFMP("Completed", "Emptying SDHC", "Emptying SDHC card on computer", newSDHCrec)

my setFMP("Completed", "Eject SDHC", "Ejecting SDHC card from USB port", newSDHCrec)

on setFMP(Status, FMPstep, messageFMP, newSDHCrec)

tell application "FileMaker Pro Advanced"

tell table "sdhcCARD"

tell record newSDHCrec

if FMPstep = "Emptying SDHC" then

set data of cell "_EmptyingSDHC" of table "sdhcCARD" to Status

else if FMPstep = "Eject SDHC" then

set data cell "_EjectSDHC" of table "sdhcCARD" to Status

end if

end tell

end tell

end tell

end setFMP

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.