Making a DataLayer Link Available
The following example illustrates how to make the data in a datalayer re-usable:
- As shown above, the example definition contains an Input Select List and DataLayer.SQL elements. The datalayer uses a regular SQL query to retrieve data from the database to present as options in aselection list.
- Beneath the datalayer, a Data Layer Link element has been added. The effect of the element is to "save" a copy of the data for future use.
You must give the element a unique ID.
If you use elements to filter, sort, and otherwise manipulate the data in the datalayer, then the positionof the Data Layer Link element in the element tree is significant. For example, above left, the raw data, as it was retrieved from the database, will be available for re-use. But, above right, because the link comes after (below) the other elements, the filtered and sorted data will be available.
You can even use multiple Data Layer Link elements beneath a datalayer. In the example above, both the raw and the filtered, sorted data would be available for re-use, for different consumers.
The data in the datalayer is now available for re-use, saving us the performance load of running one or more queries later in our application.
Please sign in to leave a comment.