Calculated Strip Refrences

Tue 12. Dec 2017, 22:30

Is there anyway to get a calculated strip to find all documents that have a hyperlink to this object?
Trying to get an entity to pool all relevant documents to a strip. Thanks in advance.
HollowGraphic
 
Posts: 2
Joined: Fri 4. Oct 2013, 13:31

Re: Calculated Strip Refrences

Thu 14. Dec 2017, 11:11

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...
User avatar
[Articy] Peter Sabath
Articy Staff
Articy Staff
 
Posts: 89
Joined: Wed 23. Nov 2011, 13:58
Location: Bochum

Re: Calculated Strip Refrences

Sat 16. Dec 2017, 18:10

Thanks! I will give this a try. I don't have ver3 but the first solution should do.

P.S: The first solution looks a lot like a query I tried. The only difference is the "->" symbol. I don't remember seeing that in the documentation. In my version I had tried something like the following "Text * Self.Name", which of course doesn't do anything because you can't "dot" into Self. Is that what the "->" symbol does?
HollowGraphic
 
Posts: 2
Joined: Fri 4. Oct 2013, 13:31

Return to Technical Discussion

Who is online

Users browsing this forum: No registered users and 18 guests

Who We Are
Contact Us
Social Links