1 Reply Latest reply on Dec 7, 2009 11:54 AM by ninja

    Login direction?

    cheathamtech

      Title

      Login direction?

      Post

      Is it possible to script so that FM recognize the USER and sets a field based on that recognition...

       

      I want to set a login so that smithj is the user.

      Then I want Filemaker to say, "Oh, smithj works at Site C, and sets a field to C, so that C's address, phone, etc. are already loaded when smithj goes to his data entry layout...

       

      I guess something like

       

      If USER=smithj,

      Then set Field Site to C...

       

      I know that's not how it would be scripted, but I guess I'm asking if that's even possible...

       

      Thanks...

       

      Dale 

        • 1. Re: Login direction?
          ninja
            

          Yes, certainly possible.

           

          Use the script step Get (AccountName).

          Note that users can change thier own "UserName" so stay away from Get(Username).

           

          If there are a large number of fields to set, consider a table to hold data for each accountName instead of a script.

          On each table you need such info, have a calculation field which = Get(AccountName) which links to your AccountInfo table.  Now you don't have to copy data...just use the relationship to access the pre-existing data.