7 Replies Latest reply on Jan 4, 2017 9:01 AM by taylorsharpe

    Field Options:  Auto Enter Timestamp

    taylorsharpe

      I have a database that I started noticing the auto enter timestamps were not working.  I actually saw a timestamp entered that was in the future by an hour.  I scratched my head and thought about it for a minute and then realized this database was being used internationally and the auto enter timestamp feature auto enters the time of the local computer and not the hosting server.  Interesting, but makes sense.  However, not all the useful for audits since we weren't recording what time zone the different users were in and therefore couldn't really compare time entries. 

       

      It sure would be nice if in addition to the auto enter timestamp of the local computer, there were additional options to get the hosting machine's timestamp or maybe the UTC time. 

       

      As our databases become more cloud-centric, we can't assume so much that people are in the same time zone as the server. 

       

      You can go to the calculation section and auto-enter the Get ( CurrentHostTimestamp ) or Get ( CurrentTimeUTCMilliseconds ).  But that isn't in the auto enter timestamp section.  It would be nice option to add up top, especially for the Modification timestamp.

        • 1. Re: Field Options:  Auto Enter Timestamp
          PeterDoern

          or perhaps just a checkbox for that section: Resolve from Host or something like that.

          • 2. Re: Field Options:  Auto Enter Timestamp
            philmodjunk

            Take a look at the function: get ( CurrentHostTimestamp )

             

            You can use the auto-enter, calculation option to enter that value.

            • 3. Re: Field Options:  Auto Enter Timestamp
              taylorsharpe

              philmodjunk wrote:

               

              Take a look at the function: get ( CurrentHostTimestamp )

               

              You can use the auto-enter, calculation option to enter that value.

               

              Yes, I noted that above in my last paragraph.  But the point was that this is not up in the auto enter timestamp section where someone would naturally first look for it. 

               

              The auto enter calculation section isn't so useful when you are trying to trigger things by the Modification timestamp in the way it does up in the timestamp section. 

              • 4. Re: Field Options:  Auto Enter Timestamp
                taylorsharpe

                PeterDoern wrote:

                 

                or perhaps just a checkbox for that section: Resolve from Host or something like that.

                 

                Great suggestion, Peter!

                • 5. Re: Field Options:  Auto Enter Timestamp
                  PeterDoern

                  To be fair, I came to this thread to make the exact same suggestion as philmodjunk.

                  • 6. Re: Field Options:  Auto Enter Timestamp
                    philmodjunk

                    If you want to suggest a change to Filemaker, make a Product Idea post so that others can see and vote for/against it.

                    The auto enter calculation section isn't so useful when you are trying to trigger things by the Modification timestamp in the way it does up in the timestamp section.

                    While not as easy, it can be done. I normally use this method when I just want a subset of the fields to trigger an update of a "modify" field, but it could be used for the entire record:

                     

                    Let ( triggers = List ( field1; field2; field3 ...) ; Get ( CurrentHostTimeStamp ) )

                     

                    Any time one of the listed fields is modified, the current host time stamp is entered into this field, provided that you leave the "do not replace..." check box unselected.

                    • 7. Re: Field Options:  Auto Enter Timestamp
                      taylorsharpe

                      Yes, I do something similar.  I often just reference the modification timestamp field.  But any reference to current time will work to update things automatically on modification. 

                       

                      And while very useful, it was not intuitive to me and I was taught about including current time functions in a field to make it auto update on modification at an FMPUG meeting.  It is one of those tricks most seasoned developers know and is good to pass on to newer developers. 

                       

                      Yes, Product suggestions are good to make.  I tend to like to kick them around in discussions first before making a product suggestion because additional input usually makes the suggestion better such as Peter's suggestion above that I like a lot! 

                       

                      Thanks for your feedback Phil and Peter.