6 Replies Latest reply on Mar 5, 2015 1:51 PM by LeeMoreau

    FileMaker users and users in a database table question

    LeeMoreau

      Title

      FileMaker users and users in a database table question

      Post

      Hey everyone, I keep getting confused by this.  I have a database that I've moved from Salesforce, it's like a CRM so to keep it simple, here's 2 tables and a couple fields:

      *Accounts*
      AccountID (primary key)
      Account Name
      OwnerID (look up value)
      OwnerID's Manager (look up value)

      *Users*
      UserID (mapped to OwnerID in Accounts)
      Full Name
      Manager ID (self join mapping back to UserID)

      So for example, I'll have an account and it will show the owner based on the value in OwnerID which it looks up from UserID and so on.

      Where I keep getting confused though is how to relate those database table users to FileMaker database users.  What I've been doing is making the FileMaker username match the UserID field under the Users table, so that when I make a new record I can have it populate the User field with Get(UserName) I think is what I use.  What I then do is under FileMaker Security when I manage users, under things like custom record privileges I just set limited, and then use a formula under Accounts such as "OwnerID = Get(UserName).

      So that definitely works fine, but I just wanted to check if that's how you should properly do it.  The reason I need users in the actual database is because I need information from those users to populate into the database.  So when a user makes a record, it fills in about 5 fields using values from their user table.  So all is working, just wanted to see if this is basically the right way.  Thanks!

        • 1. Re: FileMaker users and users in a database table question
          philmodjunk

          That seems less than ideal as you have to go from computer to computer to set and check user names set in preferences for that computer. And if a different user logs on to that computer, they see the other user's records and any records they create have the other user's name entered into this field.

          I suggest that you use Account names rather than User names. These are specified in Manage | Security so you do not have to set them up on individual computers and you it won't be possible for someone to mess this up by changing the user name preferences setting.

          • 2. Re: FileMaker users and users in a database table question
            LeeMoreau

            I'm a bit confused, what do you mean set usernames in each computer?  We just use WebDirect but if I'm a user on a computer and I open FileMaker, to open the database I'm going to go open remote, enter the address for the FileMaker Server and then select the database.  I'd never save usernames on an actual computer, users all must log in every time, however 99% of users will use WebDirect.  That pops up a window for my username/password which is what is entered under Manage | Security.  It wouldn't matter though as users would never share computers, that would be strictly against company policy.  What I'm saying though is how do I map those users to the Users table in the database?  Like I need to note for users who their manager is, their phone #, email, region, commission level, etc.  I don't see anywhere to put things like that under Manage | Security.  I then need users to only have access to their own records, and when creating a record like an Account it shows they are the owner, and then pulls data like who their manager is, phone # etc from the users table.  Then they can do list view to view just their own records etc.  That's what I'm not understanding.

            • 3. Re: FileMaker users and users in a database table question
              philmodjunk

              If you are using WebDirect, please tell us that you are using WebDirect. My answer assumed that you are using FileMaker clients not web clients. According to a note at the bottom of the Help article on Get ( UserName ), it would appear that this function enters account names for WebDirect clients. But most such systems have at least a little bit of FileMaker Client access as well so you still might want to set up your system to auto-enter account names and use Get ( accountName ) in place of user names just to be on the safe side.

              • 4. Re: FileMaker users and users in a database table question
                LeeMoreau

                Sorry I didn't realize there was a difference because when I open the database from the FileMaker application or WebDirect the login screen looks identical, asks for username and password which we enter which came from Manage | Security.  Either way I still wouldn't set a username in the FileMaker client as that's such a big security risk, users need to always log in manually never automatically.  The Get username or Get account name I'm clear on, but what I was more trying to determine was if this is the correct way to do it. Like this is really a CRM system I've made, there's Accounts, Contacts, Leads, Opportunities and Users.  The Users table has their username, full name, manager, region, things like that, with fields under Accounts that match those fields.  If I manually select a user via relationship under an Account as the "Owner", it makes the relationship and all the fields like region, manager etc under Account are populated with the details from that user record under User.  The Get username or account name is just calculated on auto-create to map the FM database user to the user in the table automatically, but just seemed awkward doing it like that.

                • 5. Re: FileMaker users and users in a database table question
                  philmodjunk

                  Sigh, but the password log on does not ask for a user name, it asks for an account name. And that was why I made this suggestion. FileMaker makes this confusing as it automatically enters the user name as the default account name, but if you read the label on the dialog or use preferences to set up a user name different from your account name, you'll find that you have to enter an account name here, not the user name.

                  • 6. Re: FileMaker users and users in a database table question
                    LeeMoreau

                    Oh right that I know, I don't use Get(UserName) anywhere, checked and it's all Get(AccountName).  When you open the database on the FileMaker application, it by default shows the proper login name if you check the box to remember it, otherwise it shows the computer log in name, which is easy enough to erase and replace with their email address which is the log in name and password.  What I'm saying is that it's not relevant what it shows here by default as the account name, as users must always enter their name and password, saving it for auto-login is not an option due to security.