get(accountname) should give you what you are after. Sounds like it doesn't for you on FM Go? Can you confirm that it properly works on FM Pro?
not working on pro
I've never seen it fail... is the file set up to log in automatically and the users have to re-login?
It might be worth using the Script Debugger and the Data Viewer here to help troubleshoot this. Add "Get ( AccountName )" to the Watch tab of the Data Viewer and then turn on the Script Debugger and open your file - the file might be set to open with a specific Account Name/Password that is set in the File menu>File Options.
You haven't mentioned how you are evaluating the result of the Get ( AccountName ) function, but using the Data Viewer is a handy way to track the value.
FileMaker 12/11/10/9/8 Certified Developer
- - - - - - - - - - - - - - - - -
Phone: +61 2 9484 6565
Mobile: +61 418 468 103
file option is not being used and yes using data viewer - no problems seeing incorrect results.
not set up auto...????
Some possibilities that come to mind:
a) You're not really logging in a Wyatt. Are you actually typing in Wyatt and a password on the login page or is your login keychained or scripted or something?
b) You're not really logging into the file you think you are...maybe two files are open? Try Get ( FileName ) in your Data Viewer to make sure.
c) You have an on open script that runs Re-login with Gary. Turn off any script triggers. If you have Advanced there's a "turn off triggers" option for the Debugger.
d) You're viewing the results in a field that is a "stored" calculation. Are you putting the expression Get ( AccountName ) into the Debugger itself?
a) acually typing in user name ans password - there is NO scripted login
b) running on server and only one file with name that is selected and only file that can be seen per selection and security.
d) no field using data view as stated above
Like, Wim, I've never seen the function fail, so my gut is telling me there's something else, some random thing we're overlooking.
Is there an account named "Wyatt" in Manage Security? What happens if you delete it or make it inactive?
If the function is used in a calculation field, make sure the field is set to be unstored. Otherwise it will remember the account name when the field was first created.
No Calc field
Using like this in startup file:
Set Variable [$$uLogin: Value:Get ( AccountName )]
Further testing has found this:
works fine when Server is set to default under - Configuration - Database Server - File Display Filter - List all databases
switch to - List only the databases each user is autorized to access - and you get the incorrect account names (not the ones typed in when logging into file)
Have you actually logged out of the files in GO, stopped FM GO from running, and then re-opened the GO program and logged into the file anew?
If GO was still running in the iOS background with files open but not in use, it's conceivable that the credentials might be different, though not expected behavior with any login.
Does this file have any permissions setting for allowing relogging into the file during a time period when iOS interrupts GO?
Are you sure that the info is really set to return the Get ( AccountName ) and not the Get ( UserName ) function? You have to check that in Pro.
yes this is not a GO issue
Are you working on a Mac? if yes, check if this file is present in your keychain