Ensuring Unique Combobox Data? - InfoPath Dev
in

InfoPath Dev

Use our Google Custom Search for best site search results.

Ensuring Unique Combobox Data?

Last post 02-23-2012 02:39 PM by nkstrou. 1 replies.
Page 1 of 1 (2 items)
Sort Posts: Previous Next
  • 02-22-2012 09:33 AM

    Ensuring Unique Combobox Data?

    Hi InfoPathers:

    My InfoPath 2010 filler form has a repeating table that contains something called Product Categorizations (Prod Cats), each of which consists of 4 tiers of comboboxes - Tier 1, Tier 2, Tier 3, and Product Name.  Because there are currently 836 unique Prod Cats (and the list is expected to grow), I have made the combos cascading for ease of usability.  I connect out to a SharePoint 2010 list for the overall list and thanks to an article on this site by Greg Collins, my comboboxes work just great.  You can either type in values or pick data from each combobox, and when you clear out any combo, it clears out all the ones below it.

    I'm wanting to use data validation to require Product Name to be unique.  Not only do I not want them entering the same Product Name within a single instance of the form, but I also don't want them picking a Product Name that already exists out in the SharePoint list either.  I've seen a procedure I think I can make use of where you set your combobox not to show a data item once it's been selected in the form, which should work for the "within a single instance of the form" case, but I'm a bit unsure how to go about enforcing uniqueness against the full SharePoint list.

     I'm not a professional IP developer, so pardon me if this is a newbie question.

     Thanks,

    nkstrou

    An imprecisely defined requirement has an infinite number of possible solutions. Unfortunately, only about a maxiumum of 3 solutions are actually satisfactory to the end user.
  • 02-23-2012 02:39 PM In reply to

    Re: Ensuring Unique Combobox Data?

    I made this one harder than it needed to be - I think because I was thinking about how I'd do the same thing in Access, which involves opening a recordset and looping through all the records checking for a match - not pretty!

    I ended up going with a validation rule using this code:   optReqType = "New" AND cboProdName is not blank AND cboProdName = ProdName (column name from the SP list).

    I had to throw in the is not blank criterion because all my blank Product Names (which are allowed) kept failing the validation!

    Cheers,

    nkstrou

    An imprecisely defined requirement has an infinite number of possible solutions. Unfortunately, only about a maxiumum of 3 solutions are actually satisfactory to the end user.
Page 1 of 1 (2 items)
Copyright © 2003-2018 Qdabra Software. All rights reserved.
View our Terms of Use.