RE: DECs and non unique key at remote Daniel W Heichel 24.Jul.12 01:22 AM a Web browser DECS All ReleasesAll Platforms
It sounds like you're using a key that isn't guaranteed to be unique in all cases. (As specified in your title, in fact.) You're basing your search on "Item Code", but some item codes are duplicated with different data.
Unfortunately, that means that Item Code is just not a good key - by itself. Not only are unique keys a necessity, the normal solution is exactly what you posted - using a second key, so that the pair is unique. In this case, it sounds like you'd need a combination of ItemCode + Date to yield unique and usable results.
I've read up on a few attempts to use multiple keys with xpages, but formulas in xpages don't support multiple keys. There seem to be some suggested workarounds out on the internet, but I can't guarantee their usefulness. (I am also not an xpages expert - usually the questions here are entirely DECS/LEI related, but the core of this problem is the reality of your data + the xpages limitation!)
Unfortunately, your data as it stands appears to clash with the tools you're using.
A couple suggestions:
- Would it be feasible to implement a numeric ID (adding a column to your data for it) that will always be unique?
- Is there any way to avoid having the duplicate Item Codes in your data? (This doesn't sound likely, but it's really the crux of the problem)