# 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.inforiver.com/display-settings/hierarchy-settings#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://3062809325-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FEbkCXCUXmtUq5tcnUtZE%2Fuploads%2Fbv2R5PKY79tfYmkx98e5%2Fimage.png?alt=media&#x26;token=e81456af-88f8-4566-b4ca-8eb2b690decd" 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://3062809325-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FEbkCXCUXmtUq5tcnUtZE%2Fuploads%2FUBuYQSlE3eFVcJnojRZ6%2FUntitled%20Project.gif?alt=media&#x26;token=99ea4ec5-baba-496e-b282-32d6fdf46179" alt=""><figcaption><p>Single child options for unbalanced hierarchies</p></figcaption></figure>
