4 Replies Latest reply on Feb 27, 2013 8:55 AM by fm4alluvu

    Best approach to display last modified date and user

    lkeyes

      I'm mystified. I've got a table that includes four fields (among the many other fields) to keep track of who created the record and when:

       

      createdate = Auto Enter Creation Date

      createby = Auto Enter Creation (AccountName)

      modifydate = Auto Enter Modify Date

      modifyby Auto Enter Modify (Account Name)

       

      On the data entry screen, I've created four merge fields at the bottom of the screen,

       

      Created on: <<createdate>> by: <<createby> Modified on: <<modifydate>> by:<<modifyby>>

       

      I've created two users. jcheney and mkapoodle, both with full rights.

       

      Now, when a log in as mkapoodle no changes seem to be evident.....the creator and modifier are always 'Admin'

       

      Now, this is a split database, (two FMP12 files...) and I defined the users in the front end, rather than the back end, thinking that the once the front end validates the user, it can then use the default Admin account to log into the data.

       

      But, I guess the larger issue is, what is the best way to implment this?

       

      Note that for the moment this is not hosted on FM server.

        • 1. Re: Best approach to display last modified date and user
          timmcmanus

          From what I understand the users must exist in both databases.  I have a similar problem on FMPS Advanced and the user authentication isn't working between databased and subsequently the "modified by" does not work at all.

           

          As stand-alone databases it works great, but once it's on the server the method stops working.

          • 2. Re: Best approach to display last modified date and user
            LabsRock

            The Account Name will be the account that was used to open what ever database your AE fields are in.  You should be careful because it sounds to me like your second database is being opened using the default Admin account automatically.  If you're at all concerned about security, this isn't a good thing.  Even if the file isn't set to be visible on the network through FM networking, if someone knows the file's name they can open it by entering the file name manually.  If they open it this way they will have administrative rights.  What's more, if you haven't disabled the admin account in your other file, they may be able to access that as well.

             

            You should have the same accounts/passwords in both files and don't set a default account/password unless you really want someone to be able to open the file without a password.  If you have the same account and password in both files, the second will be opened using the account information entered by the user to open the first file.  This will happen automatically; they won't need to enter the account/password a second time.

             

            Hope this helps.

             

            Craig

            • 3. Re: Best approach to display last modified date and user
              keywords

              Keep in mind, too, that Account Name and User Name are not the same. To autoenter the user you need to set the field to autoenter by calculation, in which case you could create a calc that also inputs date, time etc as well. Modifications can also be recorded this way.

              • 4. Re: Best approach to display last modified date and user
                fm4alluvu

                Here's a method which works for my employer:

                We created a FileMaker file Login.fp7; each record contains the following fields:

                User_Login - text example - "John Doe" or "John Smith"

                gCurrentUserLoggedIn - global text field - is set to the value of User_Login at Login
                True1 - always 1
                Once Logged in; if you have a field True1 which is always 1 in your second database, you may setup

                a relationship there File2:True1 = Login::True1 to fetch the value in the global text field gCurrentUserLoggedIn.

                createby and modifyby may be setup to enter the value gCurrentUserLoggedIn. This works because a global

                field value is local for each user.

                Regards,

                fm4alluvu