Skip to Content
0
Former Member
Sep 13, 2007 at 06:10 PM

Validation for multiple occurrences of values..

71 Views

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