2 Replies Latest reply on Sep 23, 2011 5:24 AM by LaRetta_1

    Making a toggling checkbox

    donok

      Title

      Making a toggling checkbox

      Post

      I want to make a checkbox that simply toggles "1" of checked and "0"  if unchecked.  Is that a script?

      Then, I want to be able to use it in a calculation "If checkbox = 1, then..."

      That sould be easy... right?

      Thanks for the help,

      Don

        • 1. Re: Making a toggling checkbox
          juancardona

          Use a value list, name it "bolean" with an 1 as unique value, when the checkbox is checked has the 1 value, otherwise is empty the closest value to 0.

          • 2. Re: Making a toggling checkbox
            LaRetta_1

            As Juan says, no script needed.  After you create the value list with only custom value of 1, attach a checkbox to the field.  Format the checkbox width same px as height so the '1' disappears at its side and type your own label, such as AddTax  To use this value in a calculation, it might look like this:

            Case ( AddTax = 1 ;  Amount * .03 ; Amount )

            This says to that if the checkbox is 1, include tax otherwise list amount without tax.

            Since AddTax checkbox is a Boolean, you can also write it as:

            Case ( AddTax ; Amount * .03 ; Amount )