Jump to content

Session Identifier in 19.4.1+


Recommended Posts

One of the new features in 19.4.1 is that Session Identifier replaces User Name in the server logs and Admin Console. This seems like an improvement.

We use the following steps in our startup scripts:

#Set Session Identifier, except for Server Scripts
If [ PatternCount ( Get ( ApplicationVersion ) ; "Server" ) = 0 ]
	Set Session Identifier [ Let ( [ PersistentID = " (" & Right ( Get ( PersistentID ) ; 5 ) & ")" ; SessionID = Get ( AccountName ) & PersistentID ];
		If ( Get ( SystemPlatform ) = 4 or Get ( SessionIdentifier ) = "" or Get ( SessionIdentifier ) = SessionID ; SessionID ; "Multiple Accounts" & PersistentID ) ) ]
End If

This shows the username in the all database list in the admin console, but also retains the Webdirect client id which is also implemented for FileMaker Pro clients.

The reason to exclude it from Server Scripts or Scheduled Tasks is that the Session ID is already pretty clear.

If a FileMaker Pro Client is opening several databases with different accounts then 'Multiple Accounts' is set. It would be fairly simple to change it to a comma separated list of usernames but isn't worth it for us.

Although Webdirect sessions can't open multiple databases, so Get ( SystemPlatform ) = 4 shouldn't be needed, in testing I initially found that it retained the Session Identifier from a previous session so set it to 'Multiple Accounts'. Although I can't now reproduce this issue, so assume it was a glitch, I've left it in place.

Hope this is useful for someone.

Link to comment
Share on other sites

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.