How to determine if images in DAM have tags not included to it and How many such images are there in DAM? | Community
Skip to main content
October 16, 2015
Solved

How to determine if images in DAM have tags not included to it and How many such images are there in DAM?

  • October 16, 2015
  • 2 replies
  • 1809 views

Hi All,

How to identify any recent images that have been added to the DAM that do not include any tagging in them and does not have title also. 

Can we run any query to get such assets path? I tried with some but with no luck.

Need your help with it.

Thanks in Advance.

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.
Best answer by smacdonald2008

Assuming this DAM path:

[img]tagsInDam.png[/img]

This would not be a one shot query to get this information. You need to use JCR SQL and some Java app logic to achieve this.

First - you would select all DAM Assets in a given path. 

Then for each dam asset - pass it to another method to query the metadata node (of type nt:unstructured):

<DAM ASSET>/jcr:content/metadata

Once you have the metadata node - you can check to see if that node has a cq:tags prop of type String[].

If so - place the DAM asset name into a collection. For those that do not - then place the DAM asset into another collection. Once you have gone through all DAM assets - the answer you are seeking is in the both collections. 

Hope this helps you.

2 replies

smacdonald2008
Level 10
October 16, 2015

What queries have you used so far. Have you used QueryBuilder API or JCR API. 

smacdonald2008
smacdonald2008Accepted solution
Level 10
October 16, 2015

Assuming this DAM path:

[img]tagsInDam.png[/img]

This would not be a one shot query to get this information. You need to use JCR SQL and some Java app logic to achieve this.

First - you would select all DAM Assets in a given path. 

Then for each dam asset - pass it to another method to query the metadata node (of type nt:unstructured):

<DAM ASSET>/jcr:content/metadata

Once you have the metadata node - you can check to see if that node has a cq:tags prop of type String[].

If so - place the DAM asset name into a collection. For those that do not - then place the DAM asset into another collection. Once you have gone through all DAM assets - the answer you are seeking is in the both collections. 

Hope this helps you.