Jump to content

Script to get Usernames Logged in to File


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

Recommended Posts

From a google search, I see there is no easy way to see which various accounts are currently logged in from around the globe either on IWP or locally.

Get (User

How would I setup a startup script to Get (Accountname) and paste it into a field along with logon time and then delete that data from the field with an exit script. I have tried 'IF' but I just can't get it to work.

Thanks so much,

Maria

Link to comment
Share on other sites

A simple table "Log" with three fields: Account, TimeStamp, Event.

In a startup script

Go to Layout "Log"

New Record

Set Field "Account", Get (AccountName)

Set Field "TimeStamp", Get (CurrentTimestamp)

Set Field "Event" ; "Login"

In a Closing Script:

Go to Layout "Log"

New Record

Set Field "Account", Get (AccountName)

Set Field "TimeStamp", Get (CurrentTimestamp)

Set Field "Event" ; "Logout"

Don't delete anything.

Why do you need this?

Link to comment
Share on other sites

I use a logging script as above, but keep in mind it's not 100%. Users can quit a file without running the On Close script, usually inadvertantly as a result of a crash or a dead battery in a laptop.

FileMaker Server will list the users logged into a database. Dont know if there's a script (system, not FileMaker) out there to capture that info though that would be nice.

Link to comment
Share on other sites

Ok, all done as you have stipulated... but I just have a long list of users logging in and out and I really don't know who is actually online without having to study the list. Why shouldn't I delete anything?

Couldn't I run a closing script that;

Go to Layout (Log)

Enter Find Mode

Set Field (Log:Account; Get(AccountName)

Perform Find

Delete Record

Exit application

Wouldn't that just leave me with a list oif the users currently logged in?

Thanks so much,

Maria

Link to comment
Share on other sites

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