2 Replies Latest reply on May 27, 2013 11:21 PM by CG_1

    Disable script after running once

    CG_1

      Title

      Disable script after running once

      Post

           I'm using a script that runs on an active Tab.

           Is it possible to restrict the script so it only runs once on each record?

      Example:

           Layout -> SHIFTS

           Tab inside SHIFTS -> When one Tab's active, it auto-inserts some EQUIPMENTS

           Afters inserting them once, would like to disable that script.

           When I add a new record to the SHIFTS layout, we begin again from scratch, and that Tab should run the script again, when is activated.

            

           Thanks in advance.

        • 1. Re: Disable script after running once
          philmodjunk

               There are multiple ways to do that.

               Many of them would use a value in the field fo that record in one way or another to avoid setting data to a field more than once for a given record.

               The value in the fields could be a number field set to 1 by the script. It could be an auto-entered creation or modification date field. It could be just a matter of check to see if data is alread present in this field.

               It may also be possible to set up an auto-enter field option that automatically enters the needed data from a related record when the record is first created. That would not use any script at all.

          • 2. Re: Disable script after running once
            CG_1

                 Thank you.

                 That helped me with the logic!