Repeating Table - Field Validation - InfoPath Dev
in

InfoPath Dev

Repeating Table - Field Validation

Last post 09-26-2010 04:52 PM by kerriejones. 4 replies.
Page 1 of 1 (5 items)
Sort Posts: Previous Next
  • 09-20-2010 07:24 PM

    Repeating Table - Field Validation

    I am trying to create a classic "Leave Request Form" in Infopath 2010.  I am trying to validate a field when the Leave Type requested is "Other". 

    I have four columns in a repeating table

    • Leave Type - Drop Down - Annual, Sick, Long Service, Other
    • Start Date - Date Picker
    • End Date - Date Picker
    • Reason - Text box

    In Rules, I say if

    • Leave Type = Other     AND
    • Reason is blank
    • Move a value to my error field (not in the repeating table)

    Testing with one line

    • Where the option is 'Other' with OR without the reason, then everything works fine (Validation works correctly).
    • Where the option is 'Annual' with OR without the reason, then everything works fine.

    When I enter two lines

    • Other - With a reason
    • Annual - Without a reason 
    • I am getting a value in my error field.

    Why is this validation not working how I imagine it should.

     

     

  • 09-23-2010 01:37 AM In reply to

    Re: Repeating Table - Field Validation

    Hi Kerrie,

    If one line is working but two are not, it's probably because you aren't using the xpath axis correctly in your rule comparisons functions. Search this site for Current Preceding-Sibling Axis Greg Collins and you should find Greg's blog post where he explains these concepts.

    Good luck!

    Patrick Halstead
    Project Manager at Qdabra
  • 09-23-2010 05:25 PM In reply to

    Re: Repeating Table - Field Validation

    Patrick,

    I  have looked at the suggested post and unfortunately I do not really understand it.  How do I change my rule (previously supplied) to follow the suggested solution.

    Cheers

  • 09-24-2010 01:18 AM In reply to

    Re: Repeating Table - Field Validation

    Hi Kerrie,

    No problem! Sorry for being so terse in my first reply. Can you attach your XSN form to this thread and maybe a screenshot with some mark up in Paint Brush showing what you want it to do?

    Patrick Halstead
    Project Manager at Qdabra
  • 09-26-2010 04:52 PM In reply to

    Re: Repeating Table - Field Validation

    Hi Patrick,

    I was in the middle of composing this email with all of the relevant information and have noticed that it now works.  I have done NO changes to the form , but everything now seems OK.  I do not understand why, unless the form was not publishing correctly.  It did not make sense from the beginning as the same code worked in 2007.

    Thanks anyway.

     

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