Validating a group of checkboxes - InfoPath Dev
in

InfoPath Dev

Validating a group of checkboxes

Last post 01-14-2014 06:34 AM by Jg100309. 29 replies.
Page 1 of 2 (30 items) 1 2 Next >
Sort Posts: Previous Next
  • 07-02-2008 06:49 PM

    Validating a group of checkboxes

    Hi

    How do I validate a group of checkboxes on submission to ensure that at least one checkbox has been selected? (InfoPath 2007)

    I am deploying this form to the browser in Moss rather then the infopath client. Not sure if that matters.

    Cheers 

     

  • 07-02-2008 07:09 PM In reply to

    Re: Validating a group of checkboxes

    I should mention that I'm aware I can concatenate 5 AND conditions in a control's data validation options but unfortunately I have more than 5 checkboxes.

  • 07-03-2008 07:43 AM In reply to

    Re: Validating a group of checkboxes

    Hi:

    Are the fields for your checkboxes booleans? If so, you can set them so they have a value of 0 if cleared and 1 if checked. You can add another field and set its default value to the sum of the fields associated with your checkboxes (you don't have to connect it to your control or show it on your form anywhere). Then, for each of your checkboxes, your data validation condition can be if the field with the sum of the values is equal to zero, show an error.....

    Hilary Stoupa

  • 07-06-2008 03:22 PM In reply to

    Re: Validating a group of checkboxes

    Thank you Hilary. Top suggestion !! 

  • 05-01-2009 05:11 PM In reply to

    Re: Validating a group of checkboxes

    Just used the same trick.  Thank you Hilary!

  • 08-05-2009 10:24 AM In reply to

    • deepan
    • Not Ranked
      Male
    • Joined on 08-05-2009
    • India
    • Posts 2

    Re: Validating a group of checkboxes

    Hey this really helped me a lot. Thank you Hilary

    Deepan
    Infrastructure Engineer
  • 10-27-2009 06:39 AM In reply to

    • ramii
    • Not Ranked
    • Joined on 02-02-2009
    • Posts 13

    Re: Validating a group of checkboxes

    Used the Same suggestion. worked for me..  Thanks

  • 04-29-2010 01:26 AM In reply to

    Re: Validating a group of checkboxes

    Hello, I tried the solution, but it does not work for me to be clear, as I understood, this is what I did I created a choice Group that Contains a choice section and I placed a there check-box's of type boolean, I chanced the value when checked to 1, and the value when unchecked to 0 then I added to the data source a filed of type Integer named Sum_Field, in the property value I used expression sum(group4), group4 contains the 3 check-box's in the validation property of each checkbook I used this formula Sum_Field is equal to 0 but this does not work for me !!!! any suggestion, what is the wrong of what I did above !!!!
  • 05-17-2010 08:04 AM In reply to

    Re: Validating a group of checkboxes

     Hi Hillary

    Can you send me an example how to validate a group of check boxes. I am new to infopath and i am not quite understand your directions.

    Thanks

     

  • 05-17-2010 11:19 AM In reply to

    Re: Validating a group of checkboxes

      • Right click your first check box 
      • Click Check Box Properties 
      • Data Type:  True/False (boolean) 
      • Value when Cleared:  0 
      • Value when Checked:  1 
      • Click OK 
      • Repeat for all check boxes in the group you wish to validate 
      • Click Design Tasks 
      • Click Data Source 
      • Click to select "myfields" 
      • Click "Add a field or Group" 
      • Name:  CheckBoxTotal 
      • Data Type:  Whole Number (integer) 
      • Click "OK" 
      • Right click the field you just created (CheckBoxTotal) 
      • Click Properties 
      • Click "fx" next to Default Value 
      • Click "Insert Function" 
      • Click "Insert Field or Group" 
      • Select the first check box 
      • Type a + sign after it 
      • Click "Insert Field or Group" 
      • Type a + sign after it 
      • Repeat this until all check boxes you wish to validate are in the function 
      • Click OK 
      • Click OK 
      • Right click your first check box 
      • Click Data Validation 
      • Click Add 
      • In the first drop down select your newly created field "CheckBoxTotal" 
      • Keep the "is equal to" 
      • In the last drop down box select "type a number" and enter 0 
      • Enter your screentip message (even though the dialog box will not show in the browser, but that's ok) 
      • Click OK 
      • Repeat for the remaining checkboxes you wish to validate 

      This will create a red outlining around all of the check boxes until at least one of them is checked

  • 05-18-2010 11:46 PM In reply to

    Re: Validating a group of checkboxes

     I cannt follow up from this point

    after inserting a function 

    • Click "Insert Function" 
    • Click "Insert Field or Group" 
    • Select the first check box 
    • Type a + sign after it 
    • Click "Insert Field or Group" 
    • Type a + sign after it 
    • Repeat this until all check boxes you wish to validate are in the function 
    • Click OK 
    • Click OK 
    • Right click your first check box 
    • Click Data Validation 
    • Click Add 
    • In the first drop down select your newly created field "CheckBoxTotal" 
    • Keep the "is equal to" 
    • In the last drop down box select "type a number" and enter 0 
    • Enter your screentip message (even though the dialog box will not show in the browser, but that's ok) 
    • Click OK 
    • Repeat for the remaining checkboxes you wish to validate

     

     I assume that the function is SUM()

    the formula looks like this

    sum(double click to insert field)

    then I double click and insert the checkbooks fields followed by +

    the formula looks like this

    sum(field1+field2+field3)

     when I click OK

    this error massage appears

    The formula contains one or more errors 

     

    so please could you correct me, and clarify the rest steps :)

     


  • 05-19-2010 01:39 AM In reply to

    Re: Validating a group of checkboxes

    you dont need to use sum() function..

    just  field1+ field2 + field3...

    Qazi Anis
    Technical Architect
    Bitwise Inc
  • 05-19-2010 01:47 AM In reply to

    Re: Validating a group of checkboxes

     are you sure that the formula

    field1+field2+field3

    without sum is correct !! 

    I tried it but it does not work 

     

  • 05-19-2010 02:12 AM In reply to

    Re: Validating a group of checkboxes

    can u attach ur template..

    Qazi Anis
    Technical Architect
    Bitwise Inc
Page 1 of 2 (30 items) 1 2 Next >
Copyright © 2003-2019 Qdabra Software. All rights reserved.
View our Terms of Use.