Skip to main content
Skip table of contents

Dynamic View: Filter for Tagbox

This solution shows how to configure a filter in the field “Dynamic View” based on a multi-tagbox.

Instructions

  1. You add the Dynamic View field

  2. You add the filter for a single tagbox:

    JSON
    {
    	"kind": "TermFilter",
    	"field": "pictureparkNiesen114Release.documentNumber._refId",
    	"term": "{{data.pictureparkNiesen114Release.documentNumber._refId}}"
    }
    1. This filter will relate all Content Items with the same unique document number in the layer “pictureparkNiesen114Release,” e.g., the original document number that is also assigned to all its language versions or variations.

  3. You add the filter for the first value (and only 1 value) in a multi-tagbox:

    JSON
    {
    	"kind": "NestedFilter",
    	"path": "brochureInformation.originalVersion",
    	"filter": {
    		"kind": "TermFilter",
    		"field": "brochureInformation.originalVersion._refId",
    		"term": "{{data.brochureInformation.originalVersion[0]._refId}}"
    	}
    }
    1. This filter will relate all Content Items similar to the first [0] unique original version tag in the layer “brochure information.”

    2. This only works for one value as it uses the TermFilter - just one term is accepted.

  4. You add a filter for multiple terms in a multi-tagbox:

    JSON
    {
    	"kind": "NestedFilter",
    	"path": "brochureInformation.originalVersion",
    	"filter": {
    		"kind": "TermsFilter",
    		"field": "brochureInformation.originalVersion._refId",
    		"terms": [
    			"{{data.brochureInformation.originalVersion[0]._refId}}",
    			"{{data.brochureInformation.originalVersion[1]._refId}}",
    			"{{data.brochureInformation.originalVersion[2]._refId}}",
    			]
    	}
    }
    1. This filter will relate all Content Items that match the first three values of the multi-tagbox “original version.”

This filter will always include the original content item (the base). If you want to remove the original, you exclude the id from the dynamic view:

  • JSON
    {
    	"kind": "NotFilter",
    	"filter": {
    		"kind": "TermFilter",
    		"field": "id",
    		"term": "{{id}}"
    	}
    }

JavaScript errors detected

Please note, these errors can depend on your browser setup.

If this problem persists, please contact our support.