Derived and Stored Properties

Derived and Stored properties are properties whose default value is calculated during a request from an expression that you define and then stored on the node when a request is completed.

Derived and Stored default property values are indexed so that they can be referenced when querying viewpoints. See Querying a Viewpoint. You can also use them to derive a value for a property in a hierarchy viewpoint and then access that stored value for the property in a list viewpoint.

Note:

Properties with the Derived and Stored default type are able to be queried only after a value has been either defined or derived and then stored for that property on a node. This is true even if you join the Derived and Stored query filter with an indexed property query filter using an AND statement. See Querying a Viewpoint.

Considerations

  • You can derive and store default values for node level properties only.
  • You can derive and store values for the Core.Description property, but you cannot derive and store values for any other properties in the Core or CoreStats namespaces.
  • You cannot derive and store values for properties with the Sequence data type.
  • You can set the Derived and Stored default type at the application and node type levels in the property inspector. See Editing Property Parameters.
  • Derived and Stored property values are processed during a request, an import, or when loading a viewpoint.

    Note:

    Changing a property's default type to Derived and Stored does not automatically populate existing nodes with the stored value. Follow these steps to populate existing nodes with derived and stored values:
    1. Change the property default type to Derived and Stored.
    2. Download a viewpoint that contains all of the information that is needed to derive the value for that property (for example, if the derived value expression contains positional information, download a hierarchy viewpoint). See Downloading a Viewpoint.
    3. Recommended: Remove the columns in the downloaded file that you are not updating.
    4. Perform a viewpoint load in Replace mode using the downloaded file (see Working with Viewpoint Loads).
  • You can clear the current value of a derived and stored default value in order to derive and store the value again:
    • For interactive requests, in the property that you want to clear and derive again click Actions Actions button, and then select Clear.
    • In a request file upload, use the <clear> keyword. See Request Load File Format.

Defining a Derived and Stored Property

  1. Inspect a property definition that uses a Boolean, Date, Float, Integer, List, Node, Numeric String, or String data type. See Inspecting Properties.

  2. Select an application or a node type, and then click Edit.

  3. From Default Type, select Derived and Stored.

  4. Click the Expression icon in the Default Value text box.

  5. Define an expression to calculate the property and click Apply. For information on how to define expressions, see Using Expressions to Define Custom Business Logic.

    Note:

    If you change the Default Type from Derived to Derived and Stored (or the reverse), you do not have to re-enter the expression to calculate the property value.
  6. (Optional) Select Rederive on Update to specify that the value for property should be recalculated and stored whenever a request action is performed directly on the node in a request. The recalculated value is stored when the request has been completed and closed.

    Note:

    The value for the property is recalculated only when a request action is performed on the node itself. If the calculation logic includes elements that are external to the node (such as the node's ancestors) and those are changed, the node value is not automatically recalculated. You must perform a clear action on the node in order to recalculate and store the new value.

    The value for the property is also not recalculated and stored if Lock on Commit is enabled for the property. See Understanding Property Data Type Parameters.

  7. Click Save.