Skip to main content
Version: 10.1

$.udbMeta(ds).hasChild()

note

This article is about the hasChild() function of the DataSourceMetaContainer object.

$.udbMeta(ds).hasChild()

Detects whether a given data source is a direct child data source in the current scope, or whether it is a descendent data source.

Returns a boolean.

Syntax

$.udbMeta( *ds* ).hasChild( *data-source*, *recursive* )

*recursive* ::= { true | false }

The required ds is a data source selector.

The required data-source identifies the data source to search for. Use data source path syntax to refer to data sources.

If the optional recursive is set to false (the default), the search is for direct children only. If recursive is true, the search is for children at any descendent level, for example, grandchildren.

Example

var isRelated = $.udb('COMP').hasChild('DEPT');