This article covers a Bloomreach Experience Manager version 12. There's an updated version available that covers our most recent release.

Limit the Number of Values in a Multiple Value Field

Rationale

Bloomreach Experience Manager supports document fields of "type"  multiple. By default, Bloomreach Experience Manager imposes no limit on how many instances of such a field an author can create inside a single document. There may be a need to set an upper limit to the numer of instances of this field inside a single document, f.e. pick no more than 5 related articles for a single news item document.

How to?

You can only configure an upper limit through the Console. Navigate to  /hippo:namespaces/<project-name>/<document-type>/editor:templates/_default_/<field-name> and add a property of type Long, called maxitems. The numeric value defines the upper bound on how many instances of the field you may create inside a single document. Such an upper bound is supported for both property-based fields (e.g. fields of type String) and child node-based fields (e.g. compound fields such as Link). 

Screenshot

Below screenshot shows how an upper bound of 2 or 3 look in the CMS Document Editor. Note how the upper bound is indicated and, when reached, there is no more  Add button.

Did you find this page helpful?
How could this documentation serve you better?
On this page
    Did you find this page helpful?
    How could this documentation serve you better?