Problems with repeating table validation - InfoPath Dev
in

InfoPath Dev

Problems with repeating table validation

Last post 12-06-2007 07:47 PM by 10basetom. 2 replies.
Page 1 of 1 (3 items)
Sort Posts: Previous Next
  • 11-15-2007 08:12 PM

    Problems with repeating table validation

    Hello,

    InfoPath could be a little more intutive. For example, I have a simple repeating table, but can't figure out how to set up validation so that (1) the user cannot remove all the rows, and (2) the user cannot insert a new row if the current row is empty.

    I expected to be able to go into "Repeating Table" properties and set up data validation just like for a text box, but I only see a button for Rules, which didn't do what I wanted to do (prevent the user from removing the current row if row count = 1, or adding a new row when the current row is not filled out). Please advise.

    Thanks,
    Tom
  • 11-16-2007 03:41 AM In reply to

    Re: Problems with repeating table validation

    Hi Tom

    I have achieved both of these with a workaround that is not elegant but works a treat.

    1) Set a field outside the repating bit that COUNT(s) the first field on the row and set it to fail is COUNT = 0

    2) Set a rule on the first field in the repeating table that set another field in the repeating table to 1 if not blank.  Add another field outside of the table that SUMS the field set to 1.  Then add a third field to take the SUM from the COUNT.  Then validate that field to fail if field is greater than 1.

    Job done

    Cheers

    Adam Harding
    Wales
    UK
  • 12-06-2007 07:47 PM In reply to

    Re: Problems with repeating table validation

    Hello,

    I found an elegant solution: edit the XML schema to set the 'minOccurs' attribute to 1. This article explains how to modify the schema:

    http://support.microsoft.com/kb/827006

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