addedValues Plugin

...Powerful Free! Database Expansion for Manila
logoBottle:

(1 or more words)


Get tropes here!
Click to see internals
Report bug


Maennerzeitung

sitepic_maennerzeitung.ch.jpg:
Viewable with Any Browser

Members
Join Now
Login

Requires Uniqueness?

Imagine a website that is a shop, with products that are identified by their product number. Each product has its own story with values for price, colours a description and more. It would be a problem if 2 different stories had the same product number, so having addedValues enforce that requirement is useful feature.

To do that, the product number variable must be indexed with the 'Requires Uniqueness' option set. Then when addedValues is asked to store a new or changed story; it checks that the result won't end up with 2 stories with the same value of the variable before proceeding. If there is a duplicate the operation is rejected.

If values of indexed, case insensitive, non text indexed, single valued variables with the 'Requires Uniqueness' property set, are set by a form, the form validation script is able to reject submission that would duplicate the variable in the index BEFORE the entity (message, gems, member, shortcut etc) is altered or created.

addedValues requires uniqueness for message subject and gems title builtins variables. It will also enforce this for variables whose value must be picture shortcut, or value must be gem shortcut, when used as one element of a form. This solves an old problem for Manila novices of non intuitive behaviour when duplicate pictures or gems are created.