Hello DatoCMS people. Is there an easy way to see which exact records are instancing certain Block inside StructuredText field or Modular field?
Hi @primoz.rome, you should be able to use Deep Filtering via the CDA for this, once you enable it for those fields: Deep Filtering | Documentation — DatoCMS
Will that work, or do you need to be able to do this in the UI somewhere?
1 Like
Seems promising, but don’t know how exactly setup filter to get the right result… For example I would like to find all blog posts that include “embedCode” block… This gives me some result but none of these posts include this block.
Update. I think I figured out the correct query:
query MyQuery {
allBlogPosts(filter: {content: {blocks: {containsAny: {embedCode: "true"}}}}) {
id
title
}
}
1 Like
You got it! Sorry, I should’ve deep-linked to the specific doc section that talks about that: Filter records containing at least one block of specified type
