This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

DEVELOPERS FORUM - make 2 properties unique for an Itemtype

zapping - Thursday, May 20, 2010 1:09 PM:

Hi,
 Is it possible to make 2 properties unique. For the manufacturer itemtype i have made region and name both properties unique and both are string datatype. When a new item is added it checks the combination to be unique. Is set possible to set like only one value of each should be there and not the combination. Or should it be validated on a onBeforeAdd server event method.

Like this
Name      Region
Manu1     Region1
Manu2     Region2
Manu2     Region3   (should not be added)
Manu3     Region1   (should not be added)
Manu1     Region1   (should not be added)

thx and cheers,
Zaps.