Jump to content
Claris Engage 2025 - March 25-26 Austin Texas ×

This topic is 4676 days old. Please don't post here. Open a new topic instead.

Recommended Posts

Posted

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

Posted

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

This topic is 4676 days old. Please don't post here. Open a new topic instead.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

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