Description: Selects the node that becomes the displayed root of the Tree component.
Execution: Runs during each refresh, after the tree data has been loaded and immediately before the visual tree is built. The component resets its current root to Null before calling this formula.
Arguments: The formula editor declares no event-specific arguments. On desktop, the executor nevertheless supplies Argument_DataID (the current DBForm record), Argument_SelectedNodeID and Argument_ParentNodeID (the selected node or -1), and Argument_RootID. For this event, Argument_RootID is always -1 because the root has just been reset. The custom executor does not populate Argument_EventName, Argument_SenderName or Argument_SenderID.
Result: Return the NodeID of the root to display. Return Null or an empty string to display the complete tree below its artificial root node. A non-empty ID that is not present in the loaded tree raises an error.
Availability: Desktop. The web component reaches the inherited event call, but a valid formula uses the desktop-only TreeFrame while collecting its arguments; therefore this event is not safe to configure on web.
Important: The executor does not initialize its Boolean return value when the formula is missing or invalid. Configure a valid formula whenever desktop behavior depends on this event.
Example: Display node 1001 and its descendants.
Result := 1001;
Example: Display the complete tree.
Result := Null;