ISO ideas for dealing with a large number of checkboxes - InfoPath Dev
in

InfoPath Dev

ISO ideas for dealing with a large number of checkboxes

Last post 06-19-2009 10:07 AM by warrtalon. 3 replies.
Page 1 of 1 (4 items)
Sort Posts: Previous Next
  • 06-19-2009 06:46 AM

    ISO ideas for dealing with a large number of checkboxes

    I have an infopath form which has a number of checkboxes - basically, one for each area of concern for the form.

    I need some sort of technique to programatically determine whether any of the checkboxes are checked.

    I need, during processing of the form, to display one instruction if no checkboxes are checked, and another instruction if one or more are checked.

     

    So far, I thought that I might be able to create a rule that concatenated the values of all the checkboxes, then determine the length of the resulting string. If the result was > 0, then I had hoped to set the value of a work field to true, otherwise, set it to false. However, I can't figure out how to do the conditional check and setting of the value.

     I also thought about adding the values of all the checkboxes together and then assigning that value to the work field. Unfortunately, I am getting an error that seems to indicate that sum only works on a repeating field.

     Is there a way to achieve this type of check, without resorting to writing external code?

     

    Thank you very much

     

    http://wiki.tcl.tk/
  • 06-19-2009 08:01 AM In reply to

    Re: ISO ideas for dealing with a large number of checkboxes

    Can't you just use simple conditional formatting to hide instructions when certain checkbox criteria are not met?  You can easily create a hidden field that has a default value equal to the concatenated values of the checkboxes.  Be sure that unchecked is null and checked is some value.  Your hidden field will be null if no checkboxes are checked but will have some value or set of values if one or more are checked.  This should be enough to do all sorts of conditional formatting on other controls.  I wouldn't imagine any programming is needed for your requirements.

  • 06-19-2009 09:24 AM In reply to

    Re: ISO ideas for dealing with a large number of checkboxes

    Re: can't you just use simple conditional formatting

    Thanks for the question.

    That's one thing that I've been trying to get to work. I have a hidden field. I've set it to concatenate the values of the check boxes). To test that it is working, I have a checkbox associated with it, assuming that if its value is being changed to the concatenated value, that I would see the checkbox become checked. But it isn't becoming checked. So I wondered if there were some other method for doing this since this one didn't appear to be working.

    http://wiki.tcl.tk/
  • 06-19-2009 10:07 AM In reply to

    Re: ISO ideas for dealing with a large number of checkboxes

    Instead of the checkbox, just show the field on your canvas while testing so that you can see what is actually being populated.  Then, go from there...

Page 1 of 1 (4 items)
Copyright © 2003-2019 Qdabra Software. All rights reserved.
View our Terms of Use.