Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Section
titleDeep Links

A deep link is a reference from one property to the value of another property. Deep links can be used in the Select Clause and on the right side of constraints in the Where Clause.

Section
titleSelect Clause

Suppose there is a Person document with a property Organization that references an Organization document with information about the corporation the person is working for. If this person document is part of a query result, the following deep link allows to render the organization's website as a column in the table that shows the result.

Code Block
Organization->Website

Note that the value of the Organization property needs to be a link to an organisation document. This may be a Confluence link or a link created with a macro from the projectdoc Toolbox, Display Document Property Macro for instance.

More information on using deep links to select on property values in Select Clauses in Display Macros. Besides query macros deep links can also be used in macros that display properties such as Display Document Property Macro or Display Document Properties Macro.


Section
titleConstraints in Where Clause

If you want to put a constraint on a query, where the type of a person's organization should match the type of organizations in the query result, the following could be used in the Where Clause of a query macro (e.g. Display Table Macro).

Code Block
$<Type>=[${Organization->Type}]

Suppose you query for documents of type organization and the query – in form of a Display Table Macro– is part of a document of typeperson.


Section
titleLimitations of Deep Links

What you cannot do is match a property referenced by a property of a document in the result set of a query.

Caution Box
titleBefore 4.5: Deep Links on left side of Constraints are NOT supported!

Without materialization as provided by version 4.5 of the projectdoc Toolbox, the following does not work in the Where clause of a query.

Code Block
titleThis is NOT supported!
$<Organization->Type>=$[Type]


For this example you want to make sure that the result set contains only persons that work in organizations that match the type of the current document.

If you need this sort of query you need to support this in your information model. To do so you need to materialize this reference in the person document.


...