Skip to Content
avatar image
Former Member

Validation for multiple occurrences of values..

I have a requirement to have a field that flags items as promotional items in the main catalog. This field can only have values "P1" through "P5" or <blank>.

I have made it a lookup field, so we can populate only the above listed values.

However, the dicey part is to have a validation to check for multiple occurrences of the flags i.e.

P1 or P2 ... (etc) can be assigned to only one item at a time. Of course <blank> can be assigned to as many items as we wish. In short, only 5 items can be on promotion at any given time.

The challenge is to write a validation that would check for multiple occurrences of P1-P5 values and throw an error if need be.

Anyone can think of a validation that would help me do it?

Thanks

Anshuman

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

1 Answer

  • avatar image
    Former Member
    Sep 13, 2007 at 08:25 PM

    Anshuman,

    Can you just set that field to Unique=Yes in the Console? This should stop any duplicate instances from being entered without needing to write a validation.

    Thanks,

    Tim

    Add comment
    10|10000 characters needed characters exceeded