6 Replies Latest reply on Nov 14, 2012 9:05 AM by Mike_Mitchell

    Edit field trigger

    petermontague1

      Is it possible to have a script triggered every time a field is edited?

        • 1. Re: Edit field trigger
          jbante

          Would either of the OnObjectModify or OnObjectValidate script triggers fit the bill? Note that it isn't possible to trigger a script when a field itself is edited per say, only when a field on a layout is edited by user interaction.

          • 2. Re: Edit field trigger
            Mike_Mitchell

            OnObjectKeystroke or OnObjectSave might also fit the bill, depending on what you're trying to do.

             

            Mike

            • 3. Re: Edit field trigger
              usbc

              Another (untested) approach could be to use "OnObjectEnter" to set a variable of the then existing content. Then "OnObject Exit" compare the now exiting content to the variable. If they don't match fire another script.

              • 4. Re: Edit field trigger

                Hi Peter,

                 

                It would help to know the purpose of the script.  It is possible that auto-enter, a calculation or even privileges could be used in place of (or in support of) script.  The purpose determines the action.  :-)

                • 5. Re: Edit field trigger
                  petermontague1

                  Thank you very much for all of your helpful suggestions. I want to trigger a script which will paste the contents of my pages fields, which will have a number in it. I want to paste the contents of this field into another field alongside the word pages. But I don't want to go to the trouble of typing this in when it can be scraped from a website. But sometimes it is not scraped from the website and it is easier for me to type the number of pages into the pages fields. I tried triggering the script when the record committed. But this didn't work for me because if I visit the record or make changes more than once the pages are pasted into the other field more than once.

                  • 6. Re: Edit field trigger
                    Mike_Mitchell

                    Try using the Set Field script step instead of Paste.

                     

                    Mike