FileMaker Pro 10 - 如何让光标位于新记录的第一个字段中?

发布于 2024-10-25 06:03:18 字数 437 浏览 6 评论 0原文

当我在 FileMaker 中开始一条新记录时,是否有办法让光标自动位于第一个字段中,以便我可以开始输入?并指定应该是哪个字段?

背景

我正在尝试设置 FileMaker 布局以与条形码扫描仪配合使用。因此,有人可以扫描一条记录(布局上有两个字段)。扫描后,它应该转到新记录并将光标放在扫描字段中,以便准备再次扫描。

我在扫描字段上放置了一个触发器,以在一个字段中按回车键后运行脚本来创建一条新记录。在新记录声明之后,我添加了“转到字段”声明,但它似乎没有执行任何操作。它总是转到其他字段而不是扫描字段。

更新

我只是尝试在脚本中使用“设置选择”语句,而不是“转到字段”(我也尝试一个接一个地使用这两个语句)。这些似乎都不起作用。

我尝试更改选项卡顺序,但它仍然转到其他字段而不是扫描字段。

When I start a new record in FileMaker is there a way for the cursor to automatically be in the first field so I can just start typing? And to specify which field that should be?

Background:

I'm trying to set up a FileMaker layout for use with a barcode scanner. So someone can scan in one record (there are two fields on the layout). After scanning it should go to a new record and place the cursor in the scan field so it's ready to scan again.

I put a trigger on the scan field to run a script to create a new record after hitting the enter key in the one field. After the new record statement I put a "go to field" statement but it doesn't seem to do anything. It always goes to the other field instead of the scan field.

Updates

I just tried using a "set selection" statement in the script instead of "go to field" (I also tried using both one after the other). Neither of those seemed to work.

I tried changing the tab order but it still goes to the other field instead of the scan field.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(4

习ぎ惯性依靠 2024-11-01 06:03:18

创建新记录时的默认行为是转到 Tab 键顺序中的第一个字段,因此这应该可以工作,而无需执行任何操作。

事实上,在我看来,可能没有脚本触发器,无论是在布局还是字段级别,都会干扰此操作或退出记录。尝试打开脚本调试器,创建一条新记录,然后查看脚本是否运行。

The default behavior when you create a new record is to go to the first field in the tab order, so this should work without you having to do anything.

The fact that it's not sounds to me like there might be a script trigger, either at the layout or field level, that's interfering with this or exiting the record. Try turning on the script debugger, create a new record, and see if a script runs.

泡沫很甜 2024-11-01 06:03:18

我最终做了一个解决方法。

我的扫描布局上只有一个字段。用户扫描后,会触发一个脚本,将布局更改为显示有关刚刚输入的扫描记录的所有信息。它会暂停 1 秒,然后返回到扫描布局以进行下一次扫描。

I ended up doing a workaround.

I have just one field on the scan layout. After a user scans, a script fires which changes the layout to one which shows all the information about the scanned record that was just entered. It pauses for 1 second and then goes back to the scan layout for the next scan.

夜血缘 2024-11-01 06:03:18

您可以将扫描仪设置为提交击键前和击键后数据。我们通常使用它来调用 filemaker 脚本预扫描以“转到字段”,输入数据,然后后扫描以“执行查找”

You may be able to set your scanner to submit pre and post data keystrokes. We routinely use this to invoke a filemaker script pre-scan to "go to field", enter the data, then post-scan to "perform a find"

泪意 2024-11-01 06:03:18

我最终用第二个触发脚本设计了一个不错的解决方法,它似乎没有缺点。

然而选项卡已设置,我发现在扫描字段上设置的 OnObjectExit 触发器或 OnObjectSave 触发器将执行脚本来处理扫描的数据,但将光标返回到扫描字段的步骤可能不起作用因为这个领域在某种程度上仍然活跃。

我决定在光标始终偏转的字段上设置一个 OnObjectExit 触发器,而不是用头撞砖墙。这将触发一个脚本来清除扫描字段,然后将光标返回到扫描字段,为下一次扫描做好准备。这样,光标确实回到了我想要的位置。

也许相当不优雅,但效果很好!

I eventually devised a decent workaround with a second trigger script which seems to have no disadvantages.

However the tabs are set, I have found that an OnObjectExit trigger or an OnObjectSave trigger set up on the scan field will perform a script to process the scanned data, but the the step to return the cursor to the scan field will NOT work, probably because that field is still active in some way.

Rather than banging my head against I brick wall, I decided to set up an OnObjectExit trigger on the field to which the cursor is always deflected. This fires off a script to clear the scan field and then return the cursor to the scan field, ready for the next scan. This way, the cursor DOES arrive back where I want it.

Perhaps rather inelegant, but it works fine!

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文