Jump to content
Claris Engage 2025 - March 25-26 Austin Texas ×

This topic is 6118 days old. Please don't post here. Open a new topic instead.

Recommended Posts

Posted

I want a simple script that will get the users name from the from FileMaker, then go to a table I created (Users) and get the the value of the id field that has the same user name (a copy of the user name is stored in the Users table). That should be easy, right?

What about a good reference (book, website) just for scripting? I have "The missing manual", but I'm guessing that there's something better for scripting.

Posted

The simple answer is the function Get ( AccountName ). That's the name they logged in as. Whether that matches the User name in your file I wouldn't know. But the above is the best way to identify a person. There is also Get ( UserName ), but that is unreliable. In fact, this is what FileMaker Help says about it.

Important: For greater security, use Get(AccountName) to track and manage user access: a user cannot change the account name used to log in to a database file.
Posted

In a script that runs on Open, go to a layout based on a table occurrence of your Users table and Find the record that matches the Get(AccountName). Now you have the user record and his UserID. I usually set $$UserID so I have it handy all session.

This topic is 6118 days old. Please don't post here. Open a new topic instead.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.