How can i set up filemaker so that each mac automatically logs in the user that has been set up in file Options on that particular mac?
You can't. Not like that.
Whatever you set up in the file's File > Options > auto-login
will be the same for each user.
You have to toggle off the auto-login and let every user type in their own credentials. If they want to store that in their keychain they can, which will then do the login for them when they next open the file.
As you described, if you are defining the 'Log in with...' settings of the File Options screen, then it will always use those credentials for everyone logging into the file. This screen you get to by opening the file, then going to File -> File Options:
I believe what you want to do is set up the FileMaker Preferences (arrived at by going to FileMaker Pro -> Preferences). You can use the OS's account name, or manually define a name you would like it to use.
However, this won't let you enter the password for that user - it just fills in the default user name when that user logs into any file (unless the 'File Options' from the top is defined). The user will have to enter their own PW (assuming that the FileMaker Security account is using a PW).
The third option is that the user can open the file and get prompted for a username and PW. Then the user can select the 'Remember password' option on the login screen; once they have done that, it should automatically log them into the file without any further entering of the UN or PW.
So the first two things (File Options or FileMaker Preferences) will help automatically enter a UN (and possibly a PW) into the login dialog. The third option let's the user enter in whatever UN/PW they want. And then they can have whatever UN/PW they entered be remembered for that file (this is file specific).
You can access either name from inside the FileMaker solution. The Get(Accountname) function will return whatever the user typed into the login dialog box, i.e. the security account name. The Get(UserName) function will return whatever is entered into the FileMaker Preferences screen.
(I swear I started my reply before Wim answered. It just took me a while to compose it. )
Works - thank you all - I had forgotten about FM preferences for this feature - dont use passwords so easy fix