Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

This solution shows how to show related projects or without related projects don’t show the dynamic view field at all (if no projects are found).

Instructions

  1. You add the Dynamic View field

  2. You want to have two filters

    1. Show related projects of a multi tagbox

      Code Block
      {
      	"kind": "NestedFilter",
      	"path": "pictureparkNiesen114Releaseprojects.newProject",
      	"filter": {
      		"kind": "TermFilter",
      		"field": "pictureparkNiesen114Releaseprojects.newProject._refId",
      		"term": "{{data.pictureparkNiesen114Releaseprojects.newProject[0]._refId}}"
      	}
      }
    2. Show nothing if there is no value in the tagbox for projects

      Code Block
      {
      	"kind": "NestedFilter",
      	"path": "pictureparkNiesen114Releaseprojects.newProject",
      	"filter": {
      		"kind": "ExistsFilter",
      		"field": "pictureparkNiesen114Releaseprojects.newProject._refId"
      	}
      }
  3. For the dynamic view - both filters must be true hence you need an AND filter

    Code Block
    languagejson
    {
    	"kind": "AndFilter",
    	"filters": [
    		{
    			"kind": "NestedFilter",
    			"path": "pictureparkNiesen114Releaseprojects.newProject",
    			"filter": {
    				"kind": "TermFilter",
    				"field": "pictureparkNiesen114Releaseprojects.newProject._refId",
    				"term": "{{data.pictureparkNiesen114Releaseprojects.newProject[0]._refId}}"
    			}
    		},
    		{
    			"kind": "NestedFilter",
    			"path": "pictureparkNiesen114Releaseprojects.newProject",
    			"filter": {
    				"kind": "ExistsFilter",
    				"field": "pictureparkNiesen114Releaseprojects.newProject._refId"
    			}
    		}
    	]
    }
    1. This filter will show all related projects, and at least one project must exist.

Info

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 - you can just add this to the AND filter:

  • Code Block
    languagejson
    {
    	"kind": "NotFilter",
    	"filter": {
    		"kind": "TermFilter",
    		"field": "id",
    		"term": "{{id}}"
    	}
    }

Filter by label (Content by label)
showLabelsfalse
max5
spacescom.atlassian.confluence.content.render.xhtml.model.resource.identifiers.SpaceResourceIdentifier@14170
sortmodified
showSpacefalse
reversetrue
typepage
cqllabel in ( "filter" , "filter-query" ) and type = "page" and space = "SOL"
labelskb-how-to-article