Hi HollowGraphic,
There is currently no fully fool-prove version to archive this, but you can get close. Lets evolve the query
- Code: Select all
SELECT * FROM Documents WHERE Text * SELF->DisplayName
This selects any object in the "Documents" hierarchy where the Text contains the Name of the SELF object (Your entity)
If you have a articy:draft 3 you can refine that using
- Code: Select all
SELECT * FROM Documents WHERE Text * SELF->DisplayName AND BBCodeText * "[url"
This also checks if the Text contains a hyperlink tag.
Unfortunately this is not the check if the hyperlink is to the Entity. So if the "plain" text contains the Entities name and there is another hyperlink it will get a false positive
- Code: Select all
SELECT * FROM Documents WHERE Compare(Text, Contains, SELF->DisplayName, "s") AND BBCodeText * "[url"
This version makes the name compare case-sensitive
- Code: Select all
SELECT * FROM Documents WHERE Compare(Text, Contains, Self->DisplayName, "S") AND BBCodeText * "[Url" TRANSFORM UniqueAncestors(Document)
This final query collapses all hits to their unique document parent
I hope that this is still helpful...