Allow validation rules to apply to multiple attributes and/or give entitys index a checkbox unique. - Mendix Forum

Allow validation rules to apply to multiple attributes and/or give entitys index a checkbox unique.

3

It is currently not possible to make an entities multiple-attribute index unique.

You can enforce uniqueness in other ways, by adding a BCo_Entity_PreventDuplicates to the entity combined with OCh_Entity_Attribute added everywhere you can change one of the attributes that are part of the index but that is cumbersome and errorprone.

Another option: If the index has only one attribute you can create a validation rule with the boolean 'unique' set to true. But that is not possible when the index has multiple attributes.

 

Therefor: Allow validation rules to apply to multiple attributes and/or give entity's index a checkbox 'unique'.

asked
1 answers

An alternative is to add an extra attribute to the entity and filling this BCo_Indexattribute with the concatenated values of Postalcode, Housenumber and HousenumberExtension.

Disadvantage of this method is the creation of redundant data.

Created