2 Replies Latest reply on Nov 18, 2009 12:32 PM by CraigFiore

    Time/Date/User Stamp inserted



      Time/Date/User Stamp inserted



      I'm fairly new to FM10, so forgive me if i am not familiar with all terms. But I need a little help.

      In the data base I have created, I have a button that controls a script that will send clients an email.


      What I am trying to do, is create a field that tells who clicked the button and when they clicked it. This will tell the other users who emailed the client and the time and date it went out.


      Is this possible?


      I am using a Mac with FM10 (not Advanced)




        • 1. Re: Time/Date/User Stamp inserted

          Set up a field of type TimeStamp to record the date and time the button was Clicked. Define a text field to record the user's name. If you want to create a log of such data you can put these fields in a related table.


          In the script you assign to the button, include these two steps:


          Set Field [YourTable::TimeStampField; Get ( CurrentTimeStamp) ]

          and either

          Set Field [YourTable::TextField; Get ( AccountName)]


          Set Field [YourTable::TextField; Get ( UserName ) ]


          Get ( AccountName ) returns the account name used to log into the database.

          Get ( UserName ) returns the UserName set in Preferences

          • 2. Re: Time/Date/User Stamp inserted
               Thank you, It works great!