1 Reply Latest reply on Oct 19, 2011 1:18 PM by maxwyss

    Numeric Counter Field

    LLNunez

      How can I create a field so that when a user opens a form a counter is displayed. For instance, the fist time I opened the form a rea-only field displays "1" and when the user exits out and opens the form again a "2" is displayed in that field. I'm looking into either a script that can genarate this or a script that can generate a number, code or serial number that's easy to track when an user submits the same form several times.

       

      Any and all guidance is much appreciated!

       

      Omar

        • 1. Re: Numeric Counter Field
          maxwyss Level 4

          There are a few things to decide before implementing such a counter. It is mainly the scope and uniqueness of the numbers.

           

          Scope means whether the counter should be valid for the file, for the computer, or for the world. Also, does the counter need to be consecutive, or just unique.

           

          Scope for the world is easy to decide about what has to be done. If the counter must be valid for the world, it has the be centrally managed, which means you will need a server support, and you will also need a front end which calls for the unique number, which is then either pre-filled on the server, or sent to the form and filled in client-side.

           

          If the scope has to be for the file, it is also easy. In this case, you will have the counter field, and every time you open the file, you read out the value of the counter field, and increment it. All you have to do is then to not forget to save the file…

           

          If the scope is the machine, you may work with so-called persistent global variables. However, you have to be aware that Adobe has been butchering this very useful concept, and it may no longer work properly with the newest Acrobat/Reader versions.

           

          Hope this can help.

           

          Max Wyss.