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

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

Recommended Posts

Posted

Hi,

I have a problem that I don't know how to solve and it is driving me crazy.

I guess someone had this problem before, but honestly since I am newbie I would really appreciate any help.

I have a database mounted on FMServer (not web pubblished) and I would like to have a layout that show me all the users that are connected (name or ip) and also when they disconnected.

I managed to get the number of how many are connected at the moment (with function get), but I cannot get name or ip.

Anyone can help me to suggest which function should I use please?

I tried all the fuctions(I think)but I only get the name of the pc where I am logging in,not the others....

Please help

Posted

I don't believe it can be done as you suggest, you'd have to look at the server admin console. If the server admin console were viewable as a web page, you could put a web viewer on your layout to show it.

The only way round it I can think of at the moment is to:

1) create a table called 'sessions'

2) create a script, called on opening the file, which:

a) goes to sessions layout

: new record

c) set field "username" to get(username)

d) set field "accountname" to get(accountname)

e) set field "IP address" to get(systemIPaddress)

f) set field "application version" to get(applicationVersion)

g) set field "operating system" to get(systemPlatform)

h) set field "connect time" to get(currenthosttimestamp)

i) set variable $$sessionID to sessions::ID

j) goes to starting layout

3) create a script, called on closing the file, which:

a) goes to sessions layout

;) enter find mode

c) set field sessions::ID to $$sessionID

d) perform find

e) set field "disconnect time" to get(currenthosttimestamp)

Then each user would create their own log of connects/disconnects.

You could use the same or similar log table to record all sorts of actions within the system so you could see what your users have been up to!

Hope that helps.

James

Posted

Thank you very much for your help...

Your solution is ok, but I would prefer something where I don't need to run a script.

For example, this database should have a layout were I can see in real time who is connecting.

I already have a list of authorized users that can connect...The goal should be something that hilight the name of user when they connect.When the user disconnects the highlight on the name should go back to normal.

This is possible with a script...but the problem starts when someone lose the connection...in this case the closing script doesn't run and the user stays logged in until the admin clear his record...

What can I do to solve this?

Thank

Posted

To get round the dropped connections thing you could either make the 'open' script delete any unclosed sessions for the same user, or you could take it a step further and have other actions within the system update the session record with a last activity timestamp so you'd know how long a user had been 'idle' for. Then maybe a script on FMS to delete session records that are idle for, say, 3 hours (assuming FMS disconnects users after 2 hours).

To get the highlighting effect, where you have a list of users highlighting the ones that are logged in, do as I suggest with a sessions table then add a second table with all the users' names in. The highlighting could then be applied based on the result of a relationship which looks from the user record in to your sessions table to see if there is an active session record for the user.

Posted

Thank you,very useful...

I can see, anyway, that from the admin console, user are tracked in real time (you can see them enter and exit), and also,the admin create a log for these actions, even the disconnected ones by brutal interruption....

Do you think is possible in any way to get this data out, maybe through a server script?

If yes, how?

One solution I think,could be to import the log,let's say every minute or 2 minutes, but I think would be a hell of a work for the server...

Other ideas?

Posted

use the fms command line to have it produce a text file of the current users and have fms import that.

To get you started:

fmsadmin list clients >c:program filesfilemakerfilemaker server clients.txt

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