# SINGLECHILD

Use SINGLECHILD options to select which nodes to display when a parent hierarchy has only one child. [Learn more about single-child options for hierarchies.](https://docs.fabricplan.com/planning-sheets/formula-syntax/scripting-functions/display-settings/pages/dIdzkuAyWfDyl0f4V1ur#id-4.2.-single-child)

### Syntax

```javascript
SINGLECHILD.<SINGLECHILD OPTIONS>
```

### Arguments

SINGLECHILD OPTIONS - Can be ALL, PARENTONLY, PARENTMULTILEVEL, LEVELASPARENT, ASPARENT depending on how you want to display your hierarchy.

### Example

```
SINGLECHILD.ALL // Displays all single children
SINGLECHILD.PARENTONLY // Displays the parent Only
SINGLECHILD.PARENTMULTILEVEL //Displays the parent for multi-level hierarchies with single children
SINGLECHILD.LEVELASPARENT // Displays the single child level as the parent
SINGLECHILD.ASPARENT // Displays the single child at the lowest level as the parent
```

<figure><img src="https://github.com/lumelinc/PowerTableDocs/blob/main/.gitbook/assets/image%20(2475).png" alt=""><figcaption><p>Single child functions used in variables</p></figcaption></figure>

Notice how the single child nodes are displayed depending on the button clicked. The buttons use the SINGLECHILD script options internally to display single-child row categories.

<figure><img src="https://github.com/lumelinc/PowerTableDocs/blob/main/.gitbook/assets/Untitled%20Project%20(34).gif" alt=""><figcaption><p>Single child options for unbalanced hierarchies</p></figcaption></figure>


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.fabricplan.com/planning-sheets/formula-syntax/scripting-functions/display-settings/singlechild.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
