Issues with rules on a Repeating Table in an InfoPath Form - InfoPath Dev
in

InfoPath Dev

Issues with rules on a Repeating Table in an InfoPath Form

Last post 02-02-2011 02:43 PM by Hilary Stoupa. 6 replies.
Page 1 of 1 (7 items)
Sort Posts: Previous Next
  • 02-02-2011 08:05 AM

    • Fierhauk
    • Not Ranked
      Male
    • Joined on 10-11-2010
    • Santa Rosa, CA
    • Posts 20

    Issues with rules on a Repeating Table in an InfoPath Form

    I currently have an infopath form. Inside this form is an option button for `Type' based on an ID or an account number. The user selects one or the other option and it will show a text box to be populated. Now, both the text boxes are selected to be mandatory and must be filled in. Since only one is visible depending on the user's option button selection i have set up a rule that sets the ID to `N/A' if account number is selected and if ID is selected the account number is set to `0'.

     Now, this rule set works great in the first repeating section. The second repeating section (and all additional ones) someone adds then any change to the ID/Account option button enforces the rules on all repeating sections, blanking out the account number or ID field in the other sections.

     Is there a way to get the repeating sections to handle the rule individually? I tried removing the rules from the option button itself and adding them to the repeating section but that did not work. Basically looking for any solution other than telling the users to add all the sections and then go back and fill in the fields one by one.

    Thanks!

  • 02-02-2011 09:37 AM In reply to

    Re: Issues with rules on a Repeating Table in an InfoPath Form

    Hi:

    I'm not 100% sure I understand what you are currently doing, but I think you need your Type option to be inside your repeating group -- it seems that each instance has a Type, and the Type needs to be selected -- is that the case?

    If not, if, instead, Type applies to the form as a whole, you add rules to the repeating group itself with a condition based on Type -- so when a new row is added, if Type (at the form level) is set to Option A, ID is set to N/A.

    Another option, of course, would be to use custom validation instead of "cannot be blank" validation. Then you can base the validation of your two fields on the selected Type.

    Hilary Stoupa

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

    • Fierhauk
    • Not Ranked
      Male
    • Joined on 10-11-2010
    • Santa Rosa, CA
    • Posts 20

    Re: Issues with rules on a Repeating Table in an InfoPath Form

    Hilary,

     The `Type' is actually based inside the repeating section. I have attached the form template (with submitting info stripped out as it doesn't matter here) so you can see exactly what I am referring to.

     Basically you can see it defaults values for the ID/Account fields based on the type. All repeating sections replicate the changes made in Type so the user has to go back and re-add the fields to correct them if they are reset.

  • 02-02-2011 01:11 PM In reply to

    Re: Issues with rules on a Repeating Table in an InfoPath Form

    But ClassID and AccountNumber are NOT in the repeating group -- are those supposed to be something that would be different for each instance of the repeating group?

    Hilary Stoupa

  • 02-02-2011 01:24 PM In reply to

    • Fierhauk
    • Not Ranked
      Male
    • Joined on 10-11-2010
    • Santa Rosa, CA
    • Posts 20

    Re: Issues with rules on a Repeating Table in an InfoPath Form

    They should be different each time so that is why they are inside the Repeating Section. I see in the Design they are not in the group14 which i believe definies the repeating section. Should they be moved there to ensure they process correctly with the rules?
  • 02-02-2011 02:24 PM In reply to

    • Fierhauk
    • Not Ranked
      Male
    • Joined on 10-11-2010
    • Santa Rosa, CA
    • Posts 20

    Re: Issues with rules on a Repeating Table in an InfoPath Form

    Hilary,

     You are right on with your idea. I moved the group for the ID/Account into the form's repeating section on the Design and everything is now properly working. This form was made and added to and added again and that notion of the design structure was never modifed as the form was. Thanks for leading me in the right direction. You're definitely one of the main reasons I keep this site bookmarked and refer to it constantly as I learn InfoPath.

  • 02-02-2011 02:43 PM In reply to

    Re: Issues with rules on a Repeating Table in an InfoPath Form

    Fantastic, I'm glad you've got it working!

    Hilary Stoupa

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