Validating a field against a repeating table field is not working - InfoPath Dev
in

InfoPath Dev

Validating a field against a repeating table field is not working

Last post 03-20-2012 03:28 PM by lenovo27. 11 replies.
Page 1 of 1 (12 items)
Sort Posts: Previous Next
  • 03-14-2012 03:27 PM

    Validating a field against a repeating table field is not working

    I could have sworn I did this before.

     The validation rule is as follows:

     field1 is NOT equal to field2 (field2 is in repeating table, NOTE: field2 in repeating table is being populated on form load via a web service query)

     Throw validation screentip: "Test"

    It throws the validation error EVERY time though, even when the value in field1 matches the value in field2 (a field in the first column of the repeating table.

    The validation rule is written on the field I want to validate (field1).

     

     

  • 03-14-2012 05:26 PM In reply to

    Re: Validating a field against a repeating table field is not working

    What is the validation expression?

    If you open the condition and change the first drop down to "The expression" it will display in a field next to that so you can copy and paste it in....

    Hilary Stoupa

  • 03-19-2012 08:30 AM In reply to

    Re: Validating a field against a repeating table field is not working

    Thanks for taking a look Hilary.

     

    . != ../my:field3

  • 03-19-2012 08:43 AM In reply to

    Re: Validating a field against a repeating table field is not working

    So - your initial post said you were comparing to field 2. This is comparing against field 3.....

    Hilary Stoupa

  • 03-19-2012 09:56 AM In reply to

    Re: Validating a field against a repeating table field is not working

    Sorry for the confusion, I killed the form that I was using when I first posted this. I have a new form in which field1 is the field my validation rule is written on. Field3 is the first column of the repeating table that I want to validate against.

  • 03-19-2012 12:34 PM In reply to

    Re: Validating a field against a repeating table field is not working

    The only thing I can think of is that the comparison field (field 3) isn't an exact match of field 1. Have you tried copying from field 3 and pasting into field 1? Then tabbing or clicking out so the validation is re-evaluated?

    Hilary Stoupa

  • 03-20-2012 08:13 AM In reply to

    Re: Validating a field against a repeating table field is not working

    Yup, tried that, throws the same error. Repeating tables in InfoPath seem to always be an issue. If I copy field3 out of the repeating table it works perfectly fine. As soon as I put it back into the repeating table it throws the validation error every time.

  • 03-20-2012 08:19 AM In reply to

    Re: Validating a field against a repeating table field is not working

    Can you attach a copy of your form under the Options tab?

    Hilary Stoupa

  • 03-20-2012 09:30 AM In reply to

    Re: Validating a field against a repeating table field is not working

    Please find attached. It's just a dummy form with only this concept. The actual form has a repeating table populated via a web service, but for troubleshooting I am trying to get this to work in the most basic way possible for now.

  • 03-20-2012 09:41 AM In reply to

    Re: Validating a field against a repeating table field is not working

    I see where I was confused. I hadn't realized field 1 was not in the repeating table.

    Which instance of field 2 should field 1 match? The first? The second? The 23rd? :-)

    Hilary Stoupa

  • 03-20-2012 03:28 PM In reply to

    Re: Validating a field against a repeating table field is not working

    Thanks Hilary, I found a way to accomplish this. I will post about it tomorrow or when time allows.

  • 03-20-2012 03:28 PM In reply to

    Re: Validating a field against a repeating table field is not working

    Should have been any row of field2.

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