0

全部,

在我们的 Filemaker Server 10 数据库应用程序之一上,客户端用户在运行脚本时遇到间歇性 -1728 错误,附加到一个按钮:

未知错误:-1728

在此处输入图像描述

根据我从用户那里了解到的信息,-1728 错误发生在“显示布局”命令之前。(见下文)。我怀疑在错误之前执行的“set theInventoryID”命令:

set theDatabaseName to "F&B POs"
set theCellName to "Product ID"
tell application "FileMaker Pro"

  set theInventoryID to contents of cell "ID" of current record
  tell database theDatabaseName
  --  -1728 error happens here!!

  show layout "Inventory - All Quantities"
  show every record
  ...

FM 中防弹的最佳做法是什么?

就像是?

tell application "FileMaker Pro"
 try
  set theInventoryID to contents of cell "ID" of current record
  on error
    display dialog ("Make sure all inventory ids are valid")
 end try

tell database theDatabaseName
--  -1728 error happens here
show layout "Inventory - All Quantities"
show every record
...

谢谢!

4

1 回答 1

0

It's an AppleScript error "Can't get (something)". Make sure all the layouts and fields exist. Also, if an AppleScript is run from within FileMaker, it doesn't need tell application "FileMaker Pro"/end tell block, as it's already telling the application.

于 2012-09-10T18:27:18.980 回答