Embedded Data Sources

Previous Next

You can insert (or embed) a data source into another data source.

This picture shows an EMP (Employee) data source with an inserted FUNC1 data source with a Function ID and a Short Description:

WD_help0082

 

An embedded DataSource can be used as a kind of joined column, for example in a GridControl. This picture shows a GridControl object and a part of the Property Inspector for the GridCellControl with name EMBEDDED_FUNC_DESC.

WD_help0083

The value of Data Source Item is FUNC1/SHORT_DESCRIPTION. In this string, SHORT_DESCRIPTION is the name of the data source item proper, and the prefix FUNC1/ refers to the embedded data source. The forward slash ( / ) may be similarly used in scripting to access a value stored in an embedded data source, for example:

 

$.udb('EMP').rows('current').cols('FUNC1/SHORT_DESCRIPTION').val()

 

 

See Also

Data Sources

Data Source Path Syntax

Life Time Data Source Property

Pattern 6: Re-used Embedded Page