Count checked checkboxes - InfoPath Dev
in

InfoPath Dev

Count checked checkboxes

Last post 07-24-2019 10:34 AM by User1324. 3 replies.
Page 1 of 1 (4 items)
Sort Posts: Previous Next
  • 08-25-2009 09:45 PM

    Count checked checkboxes

    Hi, I found a thread on this earlier, but I think the question was actually to count the non-checked checkboxes. All I want to do is have a number displayed on checked checkboxes. For example: Company 1 [x] Company 2 [x] Company 3 [x] Company 4 [x] Count: 4 How can I do this?
  • 08-25-2009 11:43 PM In reply to

    Re: Count checked checkboxes

    Hello and welcome to our forums!

    You can do this by using the count() function in your field "Count".

    1. Double click on the Count field (I suppose this is a text box).

    2. Click on the Default Value (fx) button in the Data tab.

    3. Click Insert Function, and select count function from the list.

    4. Click the link to insert a field. Select your first check box, say Company 1.

    5. Click Filter Data. Add a filter to set Company 1 equal to TRUE (to count only if the check box is selected), then click OK 3 times.

    6. Next to the first Count() formula, enter a plus + then repeat steps 3-5 to the rest of the check boxes. Your formula should look something like this:

    count(field1[. = string(true())]) + count(field2[. = string(true())]) + count(field3[. = string(true())]) + count(field4[. = string(true())])

    7. Click OK when done. Then make sure to check the check box "Update this value when the result of the formula is recalculated" just below the Default Value field in Data tab.

    8. Click OK.

    Try selecting/deselecting from the check boxes and see if the count works!

    Thanks,

    Jo-Anne Alfafara
    Qdabra® Software/ InfoPathDev.com
    The InfoPath Experts – Streamline data gathering to turn process into knowledge.™
  • 08-26-2009 04:41 PM In reply to

    Re: Count checked checkboxes

    Hi Jo-Anne,

    This is perfect, thank you very much.

     

    Craig.

  • 07-24-2019 10:34 AM In reply to

    Re: Count checked checkboxes

    This helped me thank you!
Page 1 of 1 (4 items)
Copyright © 2003-2019 Qdabra Software. All rights reserved.
View our Terms of Use.