1 Reply Latest reply on Aug 16, 2012 6:13 AM by philmodjunk

    conditional formatting?



      conditional formatting?


      Is it possible to have a field become a negative number depending on the value of another field?  I have a status field which has a value set of Omit, Bid and New.  If the record has an OMIT status value, than I'd like the cost field to become a negative number.

        • 1. Re: conditional formatting?

          conditional formatting changes the format of the selected object. It will not change its value.

          There are, however, several ways the action of changing the record's status can be used to change the value of your field.

          Write a script:

          If [ YourTable::Status = "Omit" ]
             Set Field [ YourTable::YourField ;  If ( YourTable::YourNumber > 0 ; YourTable::YourNumber * -1 ; YourTable::YourNumber ) ]
          End IF

          Use a script trigger on your status field to perform this script.

          Depending on what you intend to do with this field, it might also be possible to use the following if function as an auto-entered calculation.

          If ( self > 0 and Status = "omit" ; self * -1 ; self )

          Clear the do not replace existing value check box if you use this calculation