Skip to main content
Version: 11.2

Cols.getLookups()

note

This article is about the getLookups() function of the Cols object.

Cols.getLookups()​

Gets the lookup data sources that link to the first column in scope, i.e. that use it as their foreign key column.

Returns an array of data source IDs.

Syntax​

$.udb( *ds* ).cols( [columns] ).getLookups()

The required ds parameter is a data source selector.

The optional columns is a column selector. If omitted, all columns in scope are selected.

Example​

$.udb('EMP').cols('DEPT_NO').getLookups().forEach((dsId) => {
console.log('%s has a lookup that links to DEPT_NO', dsId);
});