1 Reply Latest reply on Jun 1, 2011 5:06 AM by ninja

    Calculations in an edit box



      Calculations in an edit box


      A field stores integers.
      I need to display the data in an edit box with the word 'page' before each integer.

      So far, my solution has been to create a calculated field:   "page " & table::field
      This works fine, but the multiplication of such minor calculated fields quickly clutters a table.

      Is there a way to directly perform simple calculations in an edit box within a given layout and not bother creating new fields ?
      Are there other best practices that I am not even aware of ?

      Thank you very much in advance. W.

        • 1. Re: Calculations in an edit box

          Are there other best practices that I am not even aware of ?
          Insert tongue in cheek##     Can't help you there...which ones do you know?   ## Remove tongue from cheek  ;)
          There are always more to learn...at least I've personally found that to be true.

          Another way to handle your specific case would be to put "Page" as a fixed text on the layout and not in the field.  Let the field remain simply as an integer.

          Yet another would be to launch a script on modification of that field to GetAsNumber whatever the user put in the field and SetField to your calculated value including the word.

          Many ways to skin the cat.  Best practice in any given situation is typically dependant on the big picture, and in my experience heavily dependant on the preferences of the builder.  Are you talking about doing this 20 times?  5000 times?