4 Replies Latest reply on Feb 25, 2010 9:11 AM by WC

    Need a little direction on use of checkboxes

    WC

      Title

      Need a little direction on use of checkboxes

      Post

      So my situation is this.  I need to create a bunch of checkboxes with each value to them.  I want a field to add the values as they are being checked on the check boxes, and removed if unchecked.  I was considering using repitations on a field, but it looks like that may not be possible.  I read that it was better to create a related table.  What I want to know is what is the basic steps I should be looking at to get this to work.  Thanks.

        • 1. Re: Need a little direction on use of checkboxes
          deltatango
            

          dont  use repetitions, simply use fields.

           

          if you need 5 checkboxes, make 5 fields.

           

          then make a value list and attach to each checkbox.

           

          say you want the field to have a value of 1 when checked, make a valuelist with only 1 value : 1

          if you want it to say "no" when checked, make a value list with 1 value: no

           

          etc. 

          • 2. Re: Need a little direction on use of checkboxes
            WC
               Ok that I do have running right now.  I have some checkboxes that are attached to some kind of value list.  Currently I have it as a test set up where check box 1 is a value of 1, then second is 2, and the last one is 3.  So far my field that is attached to the check boxes, and it only shows the value of the first checkbox I click on, and nothing changes when I click on the others.  What I am trying to get them to do is for a field to look at which ones are checked and add the values that are checked.  So for instance if I have box 1 and 2 checked, that a field will return the sum of 3.  Would I have to use some kind of calculation field? If so what functions should I look into to preform this task.
            • 3. Re: Need a little direction on use of checkboxes
              deltatango
                

              Yes, but this won't be accurate.

               

              Because say each field has a value of 1 when checked and you have 5 boxes:

               

              0 1 0 1

               

              will be the same as

               

              1 1 1 0

               

              in other words, they both add up to 3. 

               

              You could use letters instead, such as

               

              a b c d

               

              that way, you could use a calculation like so:

               

              CheckBoxField1 &  CheckBoxField2 &  CheckBoxField3 &  CheckBoxField4 &  CheckBoxField5

               

              That would return things like:

               

              a

              ad

              acd

              abcd 

              • 4. Re: Need a little direction on use of checkboxes
                WC
                   oh ok interesting.  I will give that a try and see what happens then.  Thanks for the help.