Articy Forum


https://www.articy.com:443/forum/

Calculated Strip Refrences

https://www.articy.com:443/forum/viewtopic.php?f=33&t=18303

Page 1 of 1

Calculated Strip Refrences

Posted: Tue 12. Dec 2017, 22:30
by HollowGraphic
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.

Re: Calculated Strip Refrences

Posted: Thu 14. Dec 2017, 11:11
by [Articy] Peter Sabath
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...

Re: Calculated Strip Refrences

Posted: Sat 16. Dec 2017, 18:10
by HollowGraphic
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?

All times are UTC
Page 1 of 1