7 Replies Latest reply on Jan 12, 2017 4:45 AM by hopkinsprinting

    Capturing Client Computer Name?

    hopkinsprinting

      I have an FM database that is shared via Instant Web Publishing which generates and sends an email after a new record is added, filled out, and submitted.  In the email that is sent, is there a way to include the name of the client computer where the record was initiated?

       

      Thank you,

      jm

        • 1. Re: Capturing Client Computer Name?
          justinc

          You mention Instant Web Publishing which implies you are using an older version of FileMaker.  What version of FM Server are you using?

           

          It's not the 'name' of the client computer, but would the IP address suffice?  "Get(SystemIPAddress)" should return the IP address of the network connection used to connect to the server.

           

          Get(SystemIPAddress)

          • 2. Re: Capturing Client Computer Name?
            hopkinsprinting

            Hi Justin,

             

            Yes, we are using version 12.  Although I would prefer computer name, IP will suffice.  So now the million dollar question:

             

            Do I just type "Get(SystemIPAddress)" into the body of the email that FM will generate?

             

            Thank you,

            jm

            • 3. Re: Capturing Client Computer Name?
              justinc

              Pretty close, but not exactly.  "Get(SystemIPAddress)" is a FileMaker function, thus it can only be used or evaluated in the context of a Calculation window.  These windows come up all the time in FileMaker - e.g. the field definition box, the DataViewer 'Watch' list, the "Set Variable" script step, etc.

               

              How are you defining the email body?  Are you using the 'Send Mail' script step, 'OpenURL' with a "mailto:" URL, or something else?

               

              Generally, you would include your body Text and the function result in one calculation.  Here's what it might look like.  The stuff in double quotes is basic text; then the double quotes are ended and the FileMaker concatenation operator ('&') is used to concatenate the result of the function call to the basic text on either side.

               

              "Hello Recipient,

              You are sending this email from " & Get(SystemIPAddress) & " computer.

              Thanks,

              The Management"

              • 4. Re: Capturing Client Computer Name?
                hopkinsprinting

                Hi Justin,

                 

                It is using a Send Mail script step.  I was able to successfully get it added HOWEVER the email is showing the IP address of the SERVER where the database is hosted.  I need it to show the IP of the CLIENT computer where the record is being initiated.  Can this be done?

                 

                Thank you so much,

                jm

                • 5. Re: Capturing Client Computer Name?
                  justinc

                  Hmmm...well, you could try:

                   

                  get(persistentID)

                  or

                  get(username)

                   

                  In my tests those were device specifc, unlike just the get(SystemIPaddress).  Or I should say...I tried them from two devices and got two different values. 

                  • 6. Re: Capturing Client Computer Name?
                    justinc

                    Are your users logging in with unique accounts to log into your system?  You could use:

                    get(accountname)

                     

                    ...if they are.  But if they are all sharing the same account, that won't help you much.

                    • 7. Re: Capturing Client Computer Name?
                      hopkinsprinting

                      Hi Justin,

                       

                      I tried get(persistentID) and get(username) and neither gave me the desired result.  Is there some external call that could be made within the script step? I did not try get(accountname) because the URL to access the DB via web browser is programmed to use one user name and password everywhere.

                       

                      Thank you so much,

                      jm