1 Reply Latest reply on May 7, 2010 7:15 AM by ninja

    Script to Clear all Fields on a Layout

    jeffd

      Title

      Script to Clear all Fields on a Layout

      Post

      FM 10 V3 on XP user.

      How would a script be written to clear all non empty or fields with a value on a particular layout?

       

       

      Thanks

        • 1. Re: Script to Clear all Fields on a Layout
          ninja

          Howdy Jeff_D,

           

          If it's only the one layout, it could be as simple as:

           

          SetField [Field1 ; ""]

          SetField [Field2 ; ""]

          SetField [Field3 ; ""]

          SetField [Field4 ; ""]

          etc., etc.

           

          If the script is to be used across multiple layouts with different fields, you'll probably need to trap the first object (field) name and cycle through the fields in a loop, exiting the loop if the object name goes back to the first one you trapped.

           

          Or the script could really be as simple as: 

          Delete Record/Request [no dialog]

          New Record/Request  ;)