2 Replies Latest reply on May 18, 2016 1:29 AM by philmcgeehan

    Script decipher help!!!!

    Angelus81

      I am a newbie with script.

       

      I found two scripts online that I seems very useful to me but a little modifications need to be done. However, I don't really understand the codecs. Could someone please help me translate the script and explain how does it works?

       

      #1

      Screenshot 2016-05-18 16.05.51.png

       

      #2

      Screenshot 2016-05-18 16.06.01.png

       

       

      Thank you!!!!

        • 1. Re: Script decipher help!!!!
          bigtom

          Pretty vague on your question and no explanation of what you want to change.

           

          #1 sets a global variable of the existing name

           

          #2 commits a change to the record and then sets a global viable with the name after change.

          It then moves to object N, likely a text filed (notes) but not sure. It updates the Notes filed by appending something like the following to the notes field:

           

          "Previous Contact was: Bob Smith on 5/1/2016 12:00:00 PM"

           

          Both of the global variable are then cleared for future use and you are returned to Object C. Whatever it is.

          1 of 1 people found this helpful
          • 2. Re: Script decipher help!!!!
            philmcgeehan
            1. Just sets a global variable called $$Existing to what is in the Customer Full Name field in the Customers table
            2. The second script:
              • Commit Records, saves any changes in the current record
              • sets a global variable called $$Current to what is in the Customer Full Name field in the Customers table
              • Goes to an object on the layout that is named N in the Inspector
              • Set Field, goes to the Notes field in the Customer table and appends who the "Previous Contact" was, using the $$Existing global variable, which was set in the first script, and the timestamp, which is the current date and time.
              • Then it clears the global variables so they don't get used accidentally
              • Finally goes to an object on the layout named C
            1 of 1 people found this helpful