Comparing the same field in a repeating table - InfoPath Dev
in

InfoPath Dev

Comparing the same field in a repeating table

Last post 02-02-2006 12:36 PM by Matt Faus. 3 replies.
Page 1 of 1 (4 items)
Sort Posts: Previous Next
  • 02-02-2006 07:49 AM

    Comparing the same field in a repeating table

    Howdy, this is my first post. I'm creating a repeating table with one field that must be unique from other instances of the same field on differant rows. I can't have any duplicate data in this field. I'd like to use a pop up window to announce this error. Also,the field will be capturing both alpha and numeric data.

    Thanks
  • 02-02-2006 09:55 AM In reply to

    Re: Comparing the same field in a repeating table

    Hi jkrdoom and welcome to the forum!

    You can accomplish this by attaching data validation to the field you want to have unique values.

    1. Find the field in the Data Source task pane, and double-click it.
    2. Go to the Data Validation tab and click Add
    3. Choose "The Expression" from the first drop-down list and use an expression like this, substituting your field name in:

    . = preceding::my:NameOfElement

    4. Type an error message in the two boxes.
    5. Click OK until you get back to the canvas.

    This should do it!

    ---------------
    Matt Faus
    InfoPath Dev Texas
    Matt Faus / Microsoft InfoPath MVP
    Qdabra® Software / Streamline data gathering to turn process into knowledge
  • 02-02-2006 11:38 AM In reply to

    Re: Comparing the same field in a repeating table

    Thanks Matt it works perfectly.

    Are these expressions and their functions listed anywhere?

    p.s. this place is great
  • 02-02-2006 12:36 PM In reply to

    Re: Comparing the same field in a repeating table

    Glad you got it to work! Check this tutorial for more help:

    http://www.w3schools.com/xpath/default.asp

    Specifically look at the XPath Axes section.

    ---------------
    Matt Faus
    InfoPath Dev Texas
    Matt Faus / Microsoft InfoPath MVP
    Qdabra® Software / Streamline data gathering to turn process into knowledge
Page 1 of 1 (4 items)
Copyright © 2003-2019 Qdabra Software. All rights reserved.
View our Terms of Use.