Check for duplicates in Repeating section - InfoPath Dev
in

InfoPath Dev

Check for duplicates in Repeating section

Last post 11-04-2016 02:30 AM by venkatsriram. 2 replies.
Page 1 of 1 (3 items)
Sort Posts: Previous Next
  • 10-17-2016 03:40 AM

    Check for duplicates in Repeating section

    All, I am new to infopath and making tiny steps. The forum is pretty useful for developers like me. We have trouble validating a control with-in Repeating section. The validation is from from the respective textbox. Have tried with the following xpath formula but could not, it throws me an error.

    count(tblinvoice[InvoiceNo != ""]) > 1 and (. = preceding-sibling::tblinvoice[@InvoiceNo] or . = following-sibling::tblinvoice[@InvoiceNo])

    "tblinvoice/InvoiceNo" does not point to a valid location path of a field or group.

    But the following code is not giving any error at the sametime it is not validating the data as well.

    count(tblInvoice[@InvoiceNo != ""]) > 1 and (. = descendant-or-self::node()/preceding-sibling::tblInvoice[@InvoiceNo] or . = descendant-or-self::node()/following-sibling::tblInvoice[@InvoiceNo])

    Request your guidance and help.

    Thanks & Regards, Venkat
  • 10-21-2016 03:59 PM In reply to

    Re: Check for duplicates in Repeating section

     See if the attached sample helps - save it locally, right click and select design, then preview. The validation rule is on field 4.

    Hilary Stoupa

  • 11-04-2016 02:30 AM In reply to

    Re: Check for duplicates in Repeating section

    Great. Thanks it worked.
Page 1 of 1 (3 items)
Copyright © 2003-2019 Qdabra Software. All rights reserved.
View our Terms of Use.