7 Replies Latest reply on Mar 27, 2014 9:17 AM by philmodjunk

    Get (AccountName)

    mike.goss@citta.co.uk

      Title

      Get (AccountName)

      Post

           I have seen other posts with similar problems, but all those involve fields, and the suggested fix doesn't work here.

           I try set a local varaiable Set Variable [$LocalVariable;Get(AccountName)]

           I seem to get the AccountName of the first user to log in, even if later another user logs in.

           Earlier forum posts talk about Fields and Global Settings, but as I am useing a Local Variable I can't see that they apply here.

            

           Help Please

           Mike

            

        • 1. Re: Get (AccountName)
          philmodjunk

               What you have shown should work to set the local variable to the account name of the current user. Since it's a local variable, how do you know if it is being set to the wrong value?

          • 2. Re: Get (AccountName)
            mike.goss@citta.co.uk

                 The script builds a Filename from a defined path & Get(AccountName) & ".jpg" which refers to a file containing an image of the signature for the current user which is then added to a layout and then printed.

                 A user Andrew logs on and the document is printed with his sgnature. User Chris logs on and the document is pronted with Andrew's signature and not his.

                  

            • 3. Re: Get (AccountName)
              philmodjunk

                   Get ( AccountName ) is reliable. I've used it a lot and their haven't been any bug reports in Report an Issue posted referring to Get ( accountName ). If I were you, I'd take a careful look at the script and how you use that file path to access your image file to see if something might not be set up right.

                   One way to immediately check the value of $Localvariable immediately after you assign a value to it (if you do not have FileMaker Advanced and it's data viewer), is to add a Show Custom Dialot immediately after the Set Variable step to show the value of the variable.

              • 4. Re: Get (AccountName)
                mike.goss@citta.co.uk

                     OK. I'll make a diary note to do just that next time I am on site with the customer (I haven't been able to make it go wrong here).

                      

                     Thanks

                • 5. Re: Get (AccountName)
                  philmodjunk

                       Please note that options such as Server Side Authentication and the Mac OS KeyChain can result in being logged into a database under a different account name than the user expects.

                  • 6. Re: Get (AccountName)
                    mike.goss@citta.co.uk

                         Thanks for that.

                         We're not using Server Side Authentication and this is a Windows environment so I don't believe either of those caveats apply in this case (they either or both might in others)

                         Mike

                    • 7. Re: Get (AccountName)
                      philmodjunk

                           Those were just a few examples. There are other ways that a file can be opened in a different account name than expected. Some other sources of confusion:

                           FileMaker has both User Names and Account Names. These are not the same thing though they can be identical for a given file open on a given computer. A User Name is specified for the application/computer user account in preferences. An Account Name is specified in manage security. And just to confuse things further, when the standard password dialog appears, FileMaker enters the User Name as the Account Name.

                           Also, file options can be set to enter account names and passwords automatically so if you have a multi-file system, the value returned by Get ( accountName ) can be the user's account name in one file and a different account name when they open a window in a different file that auto-entered the log in credentials.