3 Replies Latest reply on Feb 26, 2015 10:46 PM by Fred(CH)

    get(AccountName) matches case of login, not Account Name

    DanielKaan

      Summary

      get(AccountName) matches case of login, not Account Name

      Product

      FileMaker Pro

      Version

      7-13

      Operating system version

      Mac & PC

      Description of the issue

      The get(AccountName) function returns the text as entered in the login dialog box rather than the Account Name as specified in File > Manage > Security > Accounts

      Steps to reproduce the problem

      Define a user called "Fred Nurk" (Proper Case), login in as "fred nurk" (lower case). Then call the get(AccountName) function.

      Expected result

      "Fred Nurk"

      Actual result

      "fred nurk"

      Workaround

      I had a multiuser flagging system where the account name of every user who had the record flagged was stored in a return delimited field. I was using the

         substitute( flagnames ; "¶" & Get(AccountName) & "¶"; "¶" )

      function to remove names from this list. This was failing in circumstances where the user had logged in using another case, because the substitute() function is case sensitive (which is as it should be) but the get(AccountName) returned inappropriate data.

      I have worked around this by forcing everything to lowercase, but this should be unnecessary and I am sure others have had this issue but not gotten to the bottom of it.

      The fact that get(AccountName) should return anything other than how the Account Name is defined in Security is counter intuitive and will cause problems for other developers too.  Please change the result of Get(AccountName) to match the Account Name with case to match how the account is set up in Security, not what the user typed at login.