Possible to generate list of content fragments that have variations without editing or opening them? | Community
Skip to main content
October 18, 2021
Solved

Possible to generate list of content fragments that have variations without editing or opening them?

  • October 18, 2021
  • 1 reply
  • 960 views

Trying to avoid having to verify one at a time which content fragments currently have variations within them. I have tried performing various queries but no luck. Any ideas? 

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 lukasz-m

Hi @brianlplfinancial, you can try to run below SQL2 query

SELECT * FROM [dam:Asset] AS cf WHERE ISDESCENDANTNODE([/content/dam]) AND cf.[jcr:content/contentFragment] = true AND cf.[jcr:content/model/variations/jcr:primaryType] IS NOT NULL

1 reply

lukasz-m
Community Advisor
lukasz-mCommunity AdvisorAccepted solution
Community Advisor
October 23, 2021

Hi @brianlplfinancial, you can try to run below SQL2 query

SELECT * FROM [dam:Asset] AS cf WHERE ISDESCENDANTNODE([/content/dam]) AND cf.[jcr:content/contentFragment] = true AND cf.[jcr:content/model/variations/jcr:primaryType] IS NOT NULL
October 25, 2021

Brilliant! Thank you @lukasz-m