projectdoc Toolbox

The projectdoc Toolbox does not support dynamic values as property values. Use sections to render dynamic values and select the contents of this section instead of property values.

Audience
Type
Level of Experience
Expected Duration
5 min

Learn how to use dynamic values with the projectdoc Toolbox in your Confluence.

Summary

Avoid to use properties for dynamic values, instead use sections.

Dynamic properties and sections are resolved at request time.

Since version 6.0 there is additional tooling to support use cases with dynamic properties when used with special controls. Still dynamic properties should be used very carefully. For more information please visit Dynamic Property Values.

Selecting Dynamic Values

The value of a document property must not be dynamic. A dynamic value is a value that is calculated at page request. This is the case for instance if you use the Display Table Macro or the Display List Macro as part of the property value.

Why is this so? Since the property value is added to the Lucene Index to enable users to search for it, a dynamic value would have to be updated whenever a new document is added or an existing document is updated. It has to be checked, whether this new or updated document is part (or no longer part) of the result set of each dynamic value of each document. The projectdoc Toolbox does not do that.

There is a limited support in case you update information from a child or parent document. In this case the existing page is reevaluated and the updated values are written to the Lucene Index. But this may fail in case of a refresh / rebuild, where the proper order of document indexing is no defined. Therefore it is recommended not to use dynamic macros as property values.

More information on Rebuild Processes?

 

For more information on refresh and rebuild processes, please refer to projectdoc Rebuild Manual.

If you need to present those values on a page – you just need to display the value but there is no need to find the document with a query – there is a workaround: Just add the value to a section or content marker in the document body outside the properties table and hide it.

The query (for instance using the Display Table Macro) allows to specify property names as well as section titles in its Select Clause.

 

The full value for the Select parameter is: #N\{$[Name] ${Score} ${Scoring}\}, Short Description

The select value uses a template, named "N" where the Name (rendered with link to the document), the score (a property value) and the scoring (a section value) is rendered. The second value is the short description.

A template is introduced by the hash mark, followed by a name and the template in curly brackets. Please note the backslash to escape the curly brackets of the template boundary. If not escaped then Confluence will revolt. It has some parsing issues when curly brackets are involved. (sad)

With version 6.0 you may also chose to use the no-property control for the property with a dynamic value. In this case this property is no longer treated as property and is only rendered for display, but not as a property value. The advantage of this approach is that the information is rendered in the properties table, but it is not rendered with the other properties on refresh / rebuild.

Resources

Dynamic Property Values
Property values should only change when a document is saved. They should not be dependent on request-time. If they are, then they are called 'dynamic'.
projectdoc Document
projectdoc is based on projectdoc documents. Creating a projectdoc document is easy: A projectdoc document is a Confluence page using document properties and sections.
Display Table Macro
Lists references to projectdoc documents in a table. Allows to select document properties for columns. Also non-list representations are provided.
Document Properties Marker Macro
A table containing document properties. Three columns: name, value and meta data (aka controls) to a property.
Section Macro
Renders a section, if the body is not empty. Supports authors to create content, clutter-free rendering without empty sections. Allows to transclude the content.
projectdoc Rebuild Manual
Information for administrators on how to maintain projectdoc documents or to build them from scratch.