Table of Contents
Dynamic View: Content of Last Month by User X
Table of Contents
This solution shows how to configure a filter in the field “Dynamic View” based on the creation date.
Real-world use case:
- Show a summary of content marketing created in the last month.
- Show a summary of all content created by agency A in the last month.
- Show a summary of all content created by photographer B in the last week.
Instructions
- You add the Dynamic View field
- You add the filter for the creation date:
{"kind": "DateRangeFilter","field": "audit.creationDate","range": {"names": {},"from": "now-1M/d","to": "now"}}- This filter will relate all Content Items with a creation date in the last month from now, so all content was created within the last month.
- You add the filter for the creation date and one user:
{"kind": "AndFilter","filters": [{"kind": "DateRangeFilter","field": "audit.creationDate","range": {"names": {},"from": "now-1M/d","to": "now"}},{"kind": "TermFilter","field": "audit.createdByUser","term": "a5e981834f4f47aaa5f5c88fe1dad915"}]}- This filter will relate all Content Items with a creation date in the last month from now created by a specific user, so all content created within the last month by the user with id “a5e981834f4f47aaa5f5c88fe1dad915”.
- You add the filter for the creation date and multiple users (aka marketing) :
{"kind": "AndFilter","filters": [{"kind": "DateRangeFilter","field": "audit.creationDate","range": {"names": {},"from": "now-1M/d","to": "now"}},{"kind": "TermsFilter","field": "audit.createdByUser","terms": ["a55684734f4f47aaa5f5c88fe1dad915","a5e981834f4f47aaa556848fe1dad915","568481834f4f47aaa5f5c88fe1dad915","a5e981834f4f47aaa5f5c88fe1da5684",]}]}- This filter will relate all Content Items created within the last month by user 1, 2, 3, or 4
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:
{ "kind": "NotFilter", "filter": { "kind": "TermFilter", "field": "id", "term": "{{id}}" }}