Dynamic View: Filter for Tagbox
This solution shows how to configure a filter in the field “Dynamic View” based on a multi-tagbox.
Instructions
You add the Dynamic View field
You add the filter for a single tagbox:
JSON{ "kind": "TermFilter", "field": "pictureparkNiesen114Release.documentNumber._refId", "term": "{{data.pictureparkNiesen114Release.documentNumber._refId}}" }
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.
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}}" } }
This filter will relate all Content Items similar to the first [0] unique original version tag in the layer “brochure information.”
This only works for one value as it uses the TermFilter - just one term is accepted.
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}}", ] } }
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}}" } }