3 Replies Latest reply on Jun 3, 2014 8:10 AM by philmodjunk

    Insert a name in a field based on "HostName"



      Insert a name in a field based on "HostName"


           Using FMPro 12 - 10 pc's connected to a FMPro12 Server.  They are located in 5 different buildings.  Is there a way to setup the "HostName" to show up in a field? Example: If "HostName" is "XYZdesktop" then field (location) is "Building A".  If the receipt is created by "HostName" UVWdesktop" then field "location" will show "Building B" and so forth.  I want to associate the "HostName" with its building location. Thanks

        • 1. Re: Insert a name in a field based on "HostName"

               But what exactly do you mean by a "HostName"? In FileMaker terminology, this would be the name of the FileMaker Server system hosting the database over the network. It would never be named "desktop" under typical situations as you shouldn't be using the host as a desktop computer.

               But maybe you mean something different?

          • 2. Re: Insert a name in a field based on "HostName"


                 I am sorry, yes, it is my fault.  I meant "PC Name" being used by an "AccountName" and associate that PC with a building name.
                 I don't want to associate the "AccountName" with a building but the PC that's been used.  Of course the "HostName" is the server.
                 Thanks for correcting me.
            • 3. Re: Insert a name in a field based on "HostName"

                   You can use Preferences to assign a UserName to each computer for each computer user account that might open the database on that computer. Since we don't need user names for other purposes, we use that method here to identify specific computers on the older FileMaker system that we use here. This name can then be auto-entered into a text field when a record is created and/or modified or scripts can be used to set a field to the value of Get (UserName) when such is needed. (A user name and an account name are two different things in a FileMaker Database.)

                   But you have an alternative method available if you are using FileMaker 12 or newer. You can set up a table of computers and use Get ( PersistentID ) to log the unique ID of each computer that opens and uses FileMaker on your network. You can then auto-enter Get ( PersistentID ) to identify the computer on which a record was created or scripts can assign that value to a field when the record is modified. This ID can then be used to look up the name of the computer logged with that ID in the table of computers.