0

Timestamp在 FileMaker Pro 11 数据库中创建了一个字段,并将该字段(在文件>管理>数据库下)设置为在字段中自动输入修改时间戳(日期和时间)。

我想在数据输入期间通过自己键入时间戳来覆盖此自动输入值,但在提交时,FileMaker 会将我键入的内容替换为自动输入时间戳。更新字段也是如此。

这有可能以某种方式做到吗?

4

1 回答 1

1

Offhand I can't think of a way to do this with only one field. A three-field solution would work fairly easily, however.

Create 3 fields:

  1. Modification Timestamp (set to auto-enter Modification Timestamp)
  2. Override Timestamp (set to type: Timestamp)
  3. Display Timestamp (set to the calculation below:)

Display Timestamp:

// If Override Timestamp is Empty, show Modification Timestamp.
// Otherwise show Override Timestamp.
If ( IsEmpty ( Override Timestamp ) ;
     Modification Timestamp ;
     Override Timestamp )

Then you place Override Timestamp underneath Display Timestamp. Set Override Timestamp to be enterable only in Browse mode. Set Display Timestamp to be enterable only in Find mode.

From the UI perspective the two fields will seem to be the same field, but you'll get the desired result.

于 2013-06-28T15:41:59.797 回答