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

How to check a property value to make sure it is unique?

I want to define a property for an object and check values for duplicates. For example, in the property "foo", when I enter a value, I want it to warn me if some other object already has that same value for "foo".

I assume I'm to do this in the VBScript based property validator when defining the property, but I'm not sure how to access all the values for that property and check if it already exists or not.

I tried this with text type properties, but can it be done with "select from list" type properties as well?

Parents Reply
  • Yes, basically the customer is registering objects into the vault and each must have a unique ID number that suits the customer's desired format. (e.g., "A2023042401, B984375987...") If someone tries to register an object and uses an ID number that already exists, we want to reject that. (There is unfortunately no particular logic to the numbering, so we can't use automatic property defs.)

    We don't want to make a value list because the number of objects can reach six figures. So I assume it would follow 

    1. Get input value.

    2. Search for that value across all objects where this property is defined

    3. Raise error if found.

Children