![]() | |
![]() |
| | Thread Tools | Display Modes |
#1
| |||
| |||
|
#2
| |||
| |||
|
|
Hi, I have the following Applescript: tell application "FileMaker Pro7" tell current record of database 1 set xyz to cell "FirstName" end tell end tell This works great if I am in a layout that actually shows the field "FirstName" I do get an error message if I trigger the script from a layout that does not show the field. Is there any fix for this? Thank you very much for your help Ken |
#3
| |||
| |||
|
|
Error trapping. If [Status(CurrentLayoutName) <> "Correct Layout" Go To Layout [Correct Layout] Perform AppleScript Go To Layout [Original Layout] Narli wrote: Hi, I have the following Applescript: tell application "FileMaker Pro7" tell current record of database 1 set xyz to cell "FirstName" end tell end tell This works great if I am in a layout that actually shows the field "FirstName" I do get an error message if I trigger the script from a layout that does not show the field. Is there any fix for this? Thank you very much for your help Ken |
#4
| |||
| |||
|
|
Thank you for your suggestion Michael, but this is quite inelegant (and slow) to watch filemaker switch layouts back and forth. Besides if the field does not show in any layout then the script does not work. Any other suggestions? Thanks again Ken Error trapping. If [Status(CurrentLayoutName) <> "Correct Layout" Go To Layout [Correct Layout] Perform AppleScript Go To Layout [Original Layout] Narli wrote: Hi, I have the following Applescript: tell application "FileMaker Pro7" tell current record of database 1 set xyz to cell "FirstName" end tell end tell This works great if I am in a layout that actually shows the field "FirstName" I do get an error message if I trigger the script from a layout that does not show the field. Is there any fix for this? Thank you very much for your help Ken |
#5
| |||
| |||
|
#6
| |||
| |||
|
|
Just add a Freeze Window script step to beginning of script. Use your "all fields" layout, which should be part of all your databases, as the Go To layout. Michael Myett Narli wrote: Thank you for your suggestion Michael, but this is quite inelegant (and slow) to watch filemaker switch layouts back and forth. Besides if the field does not show in any layout then the script does not work. Any other suggestions? Thanks again Ken Error trapping. If [Status(CurrentLayoutName) <> "Correct Layout" Go To Layout [Correct Layout] Perform AppleScript Go To Layout [Original Layout] Narli wrote: Hi, I have the following Applescript: tell application "FileMaker Pro7" tell current record of database 1 set xyz to cell "FirstName" end tell end tell This works great if I am in a layout that actually shows the field "FirstName" I do get an error message if I trigger the script from a layout that does not show the field. Is there any fix for this? Thank you very much for your help Ken |
![]() |
| Thread Tools | |
| Display Modes | |
| |