3 Replies Latest reply on May 14, 2010 12:31 PM by mrvodka

    Auto-enter text values



      Auto-enter text values


      I have a sponsorship database in which want to create a field ("Status") that auto-enters one of three text values ("current", "ahead" or "behind") based on the number of an unstored calculation field ("Months").


      1. If "Months" is 0, "Status" field auto-enters "current"

      2. If "Months" is greater than 0, "Status" field auto-enters "ahead"

      3. If "Months" is less than 0, "Status" field auto-enters "behind"


      Is this possible, and if so how can I script this?


      I'm using Pro 10 on Mac OS X, and am still a novice.  Thanks in advance for any help!

        • 1. Re: Auto-enter text values

          I don't see why you need a script for this.


          In  Manage Database FIelds, you can double click the field definition for status to bring up it's field options. Click the auto-enter tab and select the by calculation option to enter this expression:


          Case ( Months = 0 ; "Current" ; Months > 0 ; "Ahead" ; "Behind" )


          You'll probably also need to clear the "do not replace existing value..." check box.

          • 2. Re: Auto-enter text values

            Thanks, that did it!  It seems so simple, but I'm simply clueless!  :)

            • 3. Re: Auto-enter text values

              I dont see how this is going to matter if you are using a Get ( CurrentDate ) for your months calculation. The auto-enter wouldn't update at all unless your calculation references a static field that that field value is updated. Perhaps you can explain how the "Months" calculation field is derived.