Help - Validate Multiple Fields - InfoPath Dev
in

InfoPath Dev

Help - Validate Multiple Fields

Last post 02-17-2011 01:09 PM by jenyo. 4 replies.
Page 1 of 1 (5 items)
Sort Posts: Previous Next
  • 02-17-2011 08:07 AM

    • jenyo
    • Not Ranked
    • Joined on 02-22-2010
    • Posts 18

    Help - Validate Multiple Fields

    Hello,

     I am working on an existing infopath 2007 form and am not a programmer.  I have about 150 new fields that cannot be blank all in one section of a form when the form is submitted, based on a couple of other conditions being true. 

    My problem - I cannot use "cannot be blank" on the fields because of the other conditions. And as I understand, you can't look check for empty fields on a section level.  Then if I use a field to check for empty fields in the section, it maxes at about 8 fields which I could do but, there must be a better way.

    Can anyone help?

     Thanks!!

  • 02-17-2011 09:49 AM In reply to

    Re: Help - Validate Multiple Fields

    I'm afraid you are going to have to set custom validation on each of your 150 fields (that seems like a lot of fields -- you may want to give your data source design a review, just in case there are some that can be removed, should be repeating instead of multiples, could be option buttons, etc).

    If the conditions are the same for all 150 (a = true, b = true and c = true) you may be able to simplify by having a single field that is true when all your conditions are met, then base your custom validation on that.

    I don't understand this part of your question, I'm afraid:

    And as I understand, you can't look check for empty fields on a section level. Then if I use a field to check for empty fields in the section, it maxes at about 8 fields which I could do but, there must be a better way.

    I'm not sure what you mean by the field "maxes at about 8 fields" -- are you talking about the UI limitations with conditions, where you can only set 5 in the UI? There are ways around that.

    Hilary Stoupa

  • 02-17-2011 12:17 PM In reply to

    • jenyo
    • Not Ranked
    • Joined on 02-22-2010
    • Posts 18

    Re: Help - Validate Multiple Fields

     

    Hi Hilary 

    Thanks for your reply -- the 150 fields are simple text fields and basically they cannot be blank.  Right now the only way I can think to do it is by setting a rule for each field where I check that it is not blank along with the other 2 conditions.

    I am very interested in what you mean by having a single field that is true if none of the 150 fields are blank but not sure how to do that?

    I really appreciate your help!

    "I don't understand this part of your question, I'm afraid:

    And as I understand, you can't look check for empty fields on a section level. Then if I use a field to check for empty fields in the section, it maxes at about 8 fields which I could do but, there must be a better way.

    I mean the number of conditions you can put under a rule.

    Thanks again....

  • 02-17-2011 12:37 PM In reply to

    Re: Help - Validate Multiple Fields

    Actually, what I meant was have a single field that considered the 2 other conditions involved so that you only had to add one condition to each field's validation (along with the field itself being blank).

    You can use a custom expression for a condition, and thus get past the "5 conditions limitation" -- like:

    my:field1 = "" or my:field2 = "" or my:field3 = ""

     

    Hilary Stoupa

  • 02-17-2011 01:09 PM In reply to

    • jenyo
    • Not Ranked
    • Joined on 02-22-2010
    • Posts 18

    Re: Help - Validate Multiple Fields

    Thank you

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