覆盖FileMaker 19中的最后编辑字段自动计算 [英] override last-edit field auto-calculation in FileMaker 19

查看:57
本文介绍了覆盖FileMaker 19中的最后编辑字段自动计算的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个表,该表使用正常的FileMaker字段定义和受保护的字段自动计算了上次更改的行(姓名)和时间(日期)的字段.

I have a table that has auto-calculated fields for who (name) and when (date) the row was last changed, using the normal FileMaker field definitions and a protected field.

但是,在一个用例中,我将数据从也有这些条目的源复制到该表中,并且我也想复制它们.但是,当我的脚本复制数据时,它会触发自动计算,最后,我的更改于"将时间"设置为当前时间并更改"时间.给当前用户.我想保留我在这些字段中提供的所有外部资源.

However, I have one use case where I copy data into this table, from a source that also has these entries, and I want to copy them as well. But when my script copies the data, it triggers the auto-calculation, and in the end, my "changed at" is set to the current time and "changed by" to the current user. I want to retain whatever my external source has in these fields.

如何临时禁用FileMaker中这些字段的自动计算,以便在脚本运行期间,它们充当普通字段并仅获取我输入的数据?

How can I temporarily disable the auto-calculation for these fields in FileMaker, so that for the duration of my script, they act as normal fields and simply take the data I enter?

推荐答案

按如下所示更改自动输入的修改字段

Change your auto-entered modification fields as follows

  • 切换到自动输入计算值
  • 关闭请勿替换字段的现有值(如果有)"

然后将自动输入计算设置为如下所示

Then set the auto-enter calculation to something like the following

Let ( trigger = GetField ( "" ) ; If ( $$SilentSync > 0 ; Self ; Get ( CurrentDate ) ) )

您需要将 Get(CurrentDate)更改为适合该字段的内容,并且需要对每个表中的所有修改字段执行此操作.

You'll need to change the Get ( CurrentDate ) to whatever is appropriate for that field, and you'll need to do this for all modification fields in every table.

此后,这些字段将在日常编辑等过程中正常工作.

After this these fields will work as normal during day-to-day editing etc.

在同步过程中设置数据时,您可以在同步过程开始时使用以下内容

When setting data during your sync you can use the following at the beginning of the sync process

Set Variable [$$SilentSync: 1]

然后在同步过程结束时清除$$ SilentSync

Then clear $$SilentSync at the end of the sync process

Set Variable [$$SilentSync: ""]

这篇关于覆盖FileMaker 19中的最后编辑字段自动计算的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆