validation on repeating table - InfoPath Dev
in

InfoPath Dev

validation on repeating table

Last post 03-15-2009 08:52 PM by maheswaran. 10 replies.
Page 1 of 1 (11 items)
Sort Posts: Previous Next
  • 03-12-2009 09:58 PM

    validation on repeating table

    I have a repeating table containing two elements

    1) selection(CHECKBOX CONTROL)
    2)category(expression box)

    How shud i validate that atleast one check box is selected

    Thanks is advance

  • 03-12-2009 10:31 PM In reply to

    • Anuma
    • Top 25 Contributor
      Female
    • Joined on 07-20-2005
    • India
    • Posts 525

    Re: validation on repeating table

    Hi,

    If you are verifying this validation while submittin a form. Then add below condition to the submit button.

    if "All occerences of checkbox" is equal to "false" then disable/hide your submit button.

    Anuma Chinthapalli /
    http://www.GGKTech.com
  • 03-12-2009 10:47 PM In reply to

    Re: validation on repeating table

    where should i give if "All occerences of checkbox" is equal to "false".

    i want atleast one check box to be selected

  • 03-12-2009 11:29 PM In reply to

    Re: validation on repeating table

    The expression:

    not(/my:myFields/my:repeatingGroup[my:checkedField = 'valueWhenChecked'])

    (substituting the underlined parts of course and adjusting the path as necessary) will be TRUE when none of the checkboxes is checked, and FALSE when at least one is checked, so you can use that as an expression in conditional formatting (to hide the submit button) or in the validation dialog.

    Jimmy Rishe / Software Developer / Microsoft MVP
    Qdabra Software
  • 03-13-2009 12:10 AM In reply to

    Re: validation on repeating table

    Actually what i want is i want to make the user select atleast one check box and that expression didnt work for this situation

  • 03-13-2009 12:28 AM In reply to

    Re: validation on repeating table

    I understand just fine what your requirement is and that expression should work.  Could you show me the expression you are trying to use?

    Jimmy Rishe / Software Developer / Microsoft MVP
    Qdabra Software
  • 03-13-2009 02:00 AM In reply to

    Re: validation on repeating table

    not(/my:myFields/my:group[my:checkbx = "no"])

    on data fields

  • 03-13-2009 05:24 AM In reply to

    Re: validation on repeating table

    Well, unless the checkboxes have a value of "no" when they are checked, I believe you should probably have a different value in those quotation marks.  (My guess is that it should be "yes".)

    Jimmy Rishe / Software Developer / Microsoft MVP
    Qdabra Software
  • 03-15-2009 04:09 AM In reply to

    • Ian Dawson
    • Top 50 Contributor
      Male
    • Joined on 01-01-2009
    • Shellharbour NSW Australia
    • Posts 154

    Re: validation on repeating table

    Hi again Jimmy,

    With the following condition
    not(/my:myFields/my:repeatingGroup[my:checkedField = 'valueWhenChecked'])

    Does that dynamically apply to all of the Repeating rows of data for the check box field?
    If you don't use the "not(/my....."  and turn the values around, would the condition still work?

    How would if the not condition is true, you increment a variable. And on the submit check for a nonzero value .

    Would that work?
    I guess on initial entry you should reset the variable. Can a not db variable be used? And how?

  • 03-15-2009 08:15 AM In reply to

    Re: validation on repeating table

    The expression I provided applies to all checkboxes in a repeating section.  It will evaluate to TRUE when all the checkboxes are unchecked and will be FALSE when one or more is checked.

    Jimmy Rishe / Software Developer / Microsoft MVP
    Qdabra Software
  • 03-15-2009 08:52 PM In reply to

    Re: validation on repeating table

    thank you jimmy it is working now..
Page 1 of 1 (11 items)
Copyright © 2003-2019 Qdabra Software. All rights reserved.
View our Terms of Use.