Breadcrumbs

SFormatLevelDef

Description

The SFormatLevelDef component  defines SFormats that returns data for all objects that are related to the level immediately above it.

Do not cache this levelDef! The parent Hierarchy will display a successful message but your components will be absent from the hierarchy



Implementation

image2021-8-2_10-52-11.png

  • Add an SFormatLevelDef in a Hierachy inside the HierarchyService

  • Define the SFormat used to search the children elements

  • You can add more Sformats using the "+" button

  • The matching child level elems will be displayed in the hierarchy (you might need to refresh the tree node)


Properties

  • Query Context:The current location is one item that could be placed in the query context. The facet value is compared with the value of the context tag on a device or point at a lower level in the navigation tree. The query context can hold anything to be used in LevelDef queries. It is comparable to a hierarchy scoped variable. You could create multiple copies of such a hierarchy definition and then customize each copy with the query context of the specific hierarchy.

  • Repeat Relation:

    • When true, the specified SFormat is evaluated until there are no further results. For example, if the SFormat “{origin.rel('out', 'n:child')}” is specified, the SFormat level def would be repeatedly evaluated until an Entity is reached that has no children

    • When false, the SFormat level def will only be evaluated once

  • Caching Repeat Limit: The number of times this level def will be repeated, if possible, when the hierarchy is cached. This limit does not affect expansion of a non-cached hierarchy. This property is only relevant when the repeatRelation property is true.

  • Sort: Determines the order in which results display

  • Formats: SFormat values used to build the hierarchy.

Examples

image2021-8-2_11-22-19.png

used SFormats:

  • {relations('in','b:isIn').filter('[{tag('b:level').lessThan(5)}]')}

  • {relations('in','b:strSourceOf').filter('[{outRel('b:eqtSourceOf').isNull.not}]')}

  • 'b:eqtSubSourceOf').filter('[{outRel('b:ptSourceOf').tag('b:definition').equals('pointType')}]')}

  • {infoSource.relations('in', 'b:eqtSubSourceOf').relations('in', 'b:eqtSubSourceOf').filter('[{outRel('b:ptSourceOf').tag('b:definition').equals('pointType')}]')}

  • {infoSource.relations('in', 'b:eqtSubSourceOf').relations('in', 'b:eqtSubSourceOf').relations('in', 'b:eqtSubSourceOf').filter('[{outRel('b:ptSourceOf').tag('b:definition').equals('pointType')}]')}

This SFormatLevelDef is used to ...


image2021-8-2_11-26-27.png


used SFormats:

  • {relations('in','b:isIn').relations('in','b:isIn').filter('[{relations('in', 'b:eqtSourceOf').isEmpty.not}]')}

  • {relations('in', 'b:eqtSourceOf')}

  • {infoSource.relations('in', 'b:eqtSubSourceOf').filter('[{outRel('b:ptSourceOf').tag('b:definition').equals('pointType')}]')}

  • {infoSource.relations('in', 'b:eqtSubSourceOf').relations('in', 'b:eqtSubSourceOf').filter('[{outRel('b:ptSourceOf').tag('b:definition').equals('pointType')}]')}

  • {infoSource.relations('in', 'b:eqtSubSourceOf').relations('in', 'b:eqtSubSourceOf').relations('in', 'b:eqtSubSourceOf').filter('[{outRel('b:ptSourceOf').tag('b:definition').equals('pointType')}]')}

This SFormatLevelDef is used to ...