January 21, 201213 yr When running the script GetUSBKEYname (see down below) the program stops at the command line set USBname to cell "vgUSBKEYTHENAME" of current Record and display the following Error message Object not found Unknown Error : -1728 However, when going to Manage Database I can see the variable name vgUSBKEYTHENAME. Is there something else I must do to register a field for it to be found when calling it in Perform AppleScript. THANKS in ADVANCE! Daniel Commande: GetUSBKEYname Set Variable [ $$USBKEYNAME; Value:100004 ] Go to Layout [ “@Preferences” (Preferences) ] Replace Field Contents [ Preferences::vgUSBKEYTHENAME; Replace with calculation: $$USBKEYNAME ] [ No dialog ] Show Custom Dialog [ Title: "vgUSBKEYNAME"; Message: Preferences::vgUSBKEYTHENAME; Buttons: “OK” ] Perform AppleScript [ Native AppleScript: set USBname to cell "vgUSBKEYTHENAME" of current Record display dialog "USBKEY: " & USBname ]
January 21, 201213 yr Author In reading further in the forum, I've found the answer to my question. Rather than writing set USBname to cell "vgUSBKEYTHENAME" of current Record it is suggested to write set USBname to cell "vgUSBKEYTHENAME" of table "Preference"
January 21, 201213 yr Automatic message This topic has been moved from "The Presentation Layer → Script Triggers" to "Database Schema & Business Logic → Managing Scripts". Oops, got the wrong topic the first time.
Create an account or sign in to comment