Data Validation error in Repeating Table / Section - InfoPath Dev
in

InfoPath Dev

Data Validation error in Repeating Table / Section

Last post 07-05-2011 08:42 AM by Jimmy. 5 replies.
Page 1 of 1 (6 items)
Sort Posts: Previous Next
  • 07-04-2011 03:14 AM

    Data Validation error in Repeating Table / Section

    Hello,

    I have an expnense claim form that I've designed in IP 2010 that has just started to play up on me and I can't figure out what's going wrong.  I have a repeating section that is set as a master/detail for all a user's expense items.  I currently have no form of data validation set up on any of the fields in the section and none of the fields are set to "cannot be blank" (I did have some validation set up but it didn't seem to be working correctly so I've removed it in the meantime)

    The problem I'm having is that when a second (or third, fouth etc.) row is entered into the repeating table, a number of fields in the section are now deciding that they cannot be blank and are being marked with red *'s!  I can't for the life of me figure out what's causing this to happen (particularly as it's only about half of the fields that are becoming required, and even more strangely, it's only fields in the right hand column of the section!).  I could probably work around this except that not all the fields in the section are required to be completed every time as they're not always relevant.

    Any thoughts/ideas?  I'm at a loss and would prefer not to have set some kind of workaround by setting default values in these fields and then blanking them out if I need them to be completed.

  • 07-04-2011 08:41 AM In reply to

    Re: Data Validation error in Repeating Table / Section

    What is the data type of the fields that are doing this?  If they are numerical, there might be some condition under which this would happen.  Are you using any special technique to add rows to the table, or just the built-in functionality?

    Jimmy Rishe / Software Developer / Microsoft MVP
    Qdabra Software
  • 07-05-2011 01:34 AM In reply to

    Re: Data Validation error in Repeating Table / Section

    Hi Jimmy, the fields are various data types.  The first field in the repeating section is a date picker field which is becoming a required field upon inserting a second row.  Then I have a text box and a DDL, neither of which become required after inserting rows.  In the second column of the section is a text box (set to decimal format) which becomes required and 2 text boxes which stay normal.

    There is also a hidden section within the body of the repeating section for data that is only relevant to certain types of expense claims - this contains 3 normal text boxes and 3 text boxes set to decimal format.  All 3 of the decimal fields are becoming required fields even though I've removed any and all validation on these fields.  Obviously this is causing problems as these fields aren't meant to be required but are being set as mandatory for every expense item, even though they can't be seen/edited most of the time.

    I am using qRules v3.1 with the insert command on a picture button to insert the new row/section.  Command being used is:

    Insert /parent=/my:ExpenseReport/my:ExpenseDetails/my:ExpenseItemsGroup /child=my:ExpenseItems /posn=1 /count=1

    Data Source is structured as follows:

    my:ExpenseReport

       my:Expense Details

          my:ExpenseItemsGroup

             my:ExpenseItems (repeating group)

    Actually, having just looked at the form again, it only seems to be happening to date picker fields and fields set to either decimal or whole number!?  Tried changing the fields to standard text boxes and this doesnt' happen...

  • 07-05-2011 07:52 AM In reply to

    Re: Data Validation error in Repeating Table / Section

    Hi Ben,

    This appears to be an issue with using qRules Insert with date/numeric fields, though this happens to be the first time I've heard of this problem.  It sounds like the necessary xsi:nil attributes are not present and this is causing a problem.

    As a workaround, please try using the following command right after your Insert command:

    SetValue /my:ExpenseReport/my:ExpenseDetails/my:ExpenseItemsGroup/my:ExpenseItems/my:Date[. = ''] /nil=true

    Replace the Date there with the actual name of your date fields.  This should add the xsi:nil attributes to any blank fields that are blank, and leave the others alone.

    If this works, please try it for the other problem fields.  Make sure to add the [. = ''] part (that's two single quotes), so that it only targets the blank fields.

    Jimmy Rishe / Software Developer / Microsoft MVP
    Qdabra Software
  • 07-05-2011 08:18 AM In reply to

    Re: Data Validation error in Repeating Table / Section

    Hi Jimmy,

    thanks again for getting back to me so quickly, unfortunately the workaround suggested doesn't seem to work.  I even copied the xpath directly from the data source to ensure I had it down right but inserting a new row still results in the date field becoming a required field :(

  • 07-05-2011 08:42 AM In reply to

    Re: Data Validation error in Repeating Table / Section

    Hi Ben,

     I'm sorry to hear that.  Could you send the form to our support alias support AT qdabra DOT com?

    Jimmy Rishe / Software Developer / Microsoft MVP
    Qdabra Software
Page 1 of 1 (6 items)
Copyright © 2003-2019 Qdabra Software. All rights reserved.
View our Terms of Use.