API Reference > presentation-common > PresentationRules > NodeArtifactsRule NodeArtifactsRule Interface Rule used to create and assign artifacts to specific nodes. The artifacts can be accessed when evaluating parent node's hideExpression to decide whether it should be hidden or not. A typical use case: The hierarchy consists of Subject nodes and each Subject may or may not have child Model nodes. There are 2 types of Models: A & B, we want ModelA nodes to be visible and ModelB ones to be hidden. We want Subject node to be visible only if it has a Model (either A or B). In this case we can't use hideIfNoChildren flag on Subjects, because a Subject node may only have a related ModelB which means Subject doesn't have children and should be displayed as a leaf node. The solution is to use NodeArtifacts on the ModelB nodes and a hideExpression on Subject nodes. The expression can access artifacts created by child ModelB nodes: NOT ThisNode.HasChildren AND NOT ThisNode.ChildrenArtifacts.AnyMatches(x => x.IsModelB) note The rule is costly performance-wise and should only be used in very limited amount of specific cases where hidden child nodes need to be used to used to determine parent node's visibility. see More details Extends RuleBase ConditionContainer Properties Name Type Description condition undefined | string Defines a condition for the rule, which needs to be met in order for it to be used. items { T } A map of items that define the values stored in the artifacts data structure. ruleType NodeArtifacts Used for serializing to JSON. Inherited properties Name Type Inherited from Description onlyIfNotHandled undefined | boolean RuleBase Should this rule should be ignored if there is already an existing priority undefined | number RuleBase Defines the order in which presentation rules will be evaluated and executed. requiredSchemas undefined | RequiredSchemaSpecification[] RuleBase Schema requirements for this rule. Defined in presentation/common/src/presentation-common/rules/hierarchy/NodeArtifactsRule.ts Line 30 Last Updated: 12 June, 2024