Phasing out values from Content Navigator Choicelists

With Corona on the verge of closing schools and daycare in the coming week, i figured it was a good time to do some client-work, so i logged in. Immediately i found a colleague online as well (on a Sunday?!) . Anyway, he was working on a little script that needed some finetuning.

The script was to allow content-navigator render values that were no-longer valid according to EDS / Filenet (think of migrated content). The OOTB implementation would just “hide” them.

Eventually we tinkered the following:

        LayoutPropertiesPane) {

        aspect.around(LayoutPropertiesPane.prototype, "renderAttributes", function(originalrenderAttributes) {
            return function(attributeDefinitions, item, reason, isReadOnly, params) {

                attributeDefinitions.forEach(function(def) {

                    function addChoiceIfNotExists(value) {
                        var choiceExists = def.choiceList.choices.some(function(choice) {
                            return choice.value === value
                        if (!choiceExists) {
                                valid: true,
                                displayName: value + " - deprecated",
                                value: value

                    if (def.choiceList) {
                        if (def.cardinality === "LIST") {
                        } else if (def.cardinality === "SINGLE") {
                        } else {
                            throw "Unexpected choicelist cardinality";

                originalrenderAttributes.apply(this, arguments);

Credits of course to my colleague with the long name 😉 Bruno Raphael Marques de Santana.

Leave a Reply

Your email address will not be published. Required fields are marked *