February 3, 201213 yr 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
February 4, 201213 yr 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