Search code examples
filemaker

How To Override Auto-enter Timestamp In FileMaker


I have created a Timestamp field in a FileMaker Pro 11 database and set the field (under File>Manage>Database) to auto-enter a Modification Timestamp (Date and Time) into the field.

I want to override this auto-enter value during data entry by typing a timestamp myself, but upon commit, FileMaker replaces what I type with an auto-enter timestamp. This is the same for updating the field as well.

Is this possible to do somehow?


Solution

  • 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.