Data validation issue - Unique entries based on certain fields - InfoPath Dev
in

InfoPath Dev

Data validation issue - Unique entries based on certain fields

Last post 11-06-2012 03:13 PM by Hilary Stoupa. 1 replies.
Page 1 of 1 (2 items)
Sort Posts: Previous Next
  • 11-06-2012 12:48 PM

    Data validation issue - Unique entries based on certain fields

    First off, huge shoutout to Hillary Stoupa (the Stoupa-fier!) & her fellow team members, you guys are the bomb and have saved my a** with this site. I consider myself pretty pro with it now, but have gotten stumped on what feels like something incredibly simple.

    I have a form in which people enter data about unique projects. Each project has three attributes. Region, Enabler and Product. The only time there cannot be a duplicate project name is when the region, enabler and project are the same. My plan was as to do the following Validation: (note: all main data source reference is in regards to data fields)

    IF enabler in the main data source is equal to enabler in the secondary data source  AND

    region main data source is equal to region the secondary data source  AND

    Product in the main data source is equal to Product in the secondary data source  AND

    Project Name in the main datasource is equal to project name in the secondary datasource

     

    Does not seem to work right, any ideas?

  • 11-06-2012 03:13 PM In reply to

    Re: Data validation issue - Unique entries based on certain fields

    Hey there - glad the site has been helpful to you!

    You are probably going to need a slightly fancier XPath that dear old InfoPath is generating for you with its UI - you basically have to check for a row in the secondary data source where all four fields are the same. I've attached a simple sample form - save it locally, right click and preview - type a lower-case a in the empty text box and, since a row exists in the 2DS where all the fields match, you'll get a validation error.

    Hilary Stoupa

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