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

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

Recommended Posts

Posted

Hi,

I'm attempting to write a database that uses the account, which is their badge number. In the db there is a script that I am trying to have their account placed in a text box, but I only see "Insert Current User Name", there is no "current user account".

Another curious question I have is that when you initially start up FMP7 and go to log it it automatically assumes your account is your windows login name, (not the same as the badge number I am trying to use as my account). This affects it as well because under properties I wanted to make an automatic field that says the FIELD=account name (not user name!). But when it automatically does this it is placing the windows login name, not the account name I logged in as. I hope this is some what coherent.

Oh, the goal I am trying to accomplish here is a time clock situation and here is what I have so far. The user presses the 'clock in' button and it takes them to a screen where the account name is placed into a field and a timestamp in another. Easy enough. The problem is the clock out part. How I wanted to do it is that when you press the clock out button it opens the same window, performs a find based on the current user account (NOT NAME!) and goes to the last record, which should always be the last 'punch in', and the place the punch out timestamp in the appropriate field.

Maybe this is a bad design, if so, can someone please help me with a time keeper system?!?

Thanks, Vandy

Posted

What you want to use is the AccountName, NOT the User Name; 2 different things, as you've found. Yes, when they first log in, it will assume their User Name, and they'll have to enter their account name.

Or, each person can change their User Name to their Account Name. It's in the FileMaker Preferences, right in the 1st panel. But that reduces your security somewhat, since anyone could walk up to that computer and find out the User Name, hence account name; they'd still need the password though.

The function to get their account name is (surprise) Get (AccountName). A nifty feature in 7 is that any text field can auto-enter the account name, on either creation or modification. It's one of the drop-down options (last one) in the Auto-enter pane of Options, in Define Fields. Timestamp can also be auto-entered on creation.

Log out is always a bit more of a problem. You could do it the way you're doing it, but using the Account Name.

Another way to do it would be to create an unstored calculation field, = Get (AccountName), and a relationship to the AccountName field.

If you sort that relationship descending, by Timestamp In, then "relationship::Timestamp Out" will be the last entry for the person, and it can be set in one step. It also makes for a cute portal :-)

The Log Out script should be run on closing, in File Options.

This topic is 7231 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.