Overview
In legacy Construct, the Runtime Datasource property allowed a single field to dynamically switch between different datasources based on the value of another field in the same row. For example, when a user selected a Location, the Materials list box in that row would query a location-specific datasource.
This enabled dependent lookups: the list of available options changed based on another field's value, with each row potentially using different datasources.
Cloud Construct does not support per-row datasource (dataset) switching and datasets are fixed at configuration time per page/container. However, Cloud Construct offers the following alternatives to achieve similar results:
Updated Methodology
Approach A: Dependent List Box Filtering (Recommended)
This is the most flexible and cloud-efficient approach for dependent lookups.
How It Works:
Create a single unified view containing all materials for all locations and register it as a list box dataset.
Configure the Materials list box field using this dataset.
Create a dependent list box filter:
List Dataset Field: Locationwith filter criterion:Data Record Field Value: Location = Locationusing the Location list box in the same grid or form container. Refer to Add Dependent List Box Filter for more information.When the user selects a Location, the Materials list box automatically refreshes and fetches only materials for that location.
Approach B: UNION ALL View with a Discriminator Column
Use this only if you have complex data polymorphism or incompatible schemas.
How It Works:
Create a UNION ALL view that combines all datasource variants with a discriminator column.
Filter dynamically on the discriminator column value.
Example:
CREATE VIEW UnifiedMaterials AS SELECT MaterialID, MaterialName, LocationID, 'US' AS Location, Quantity FROM US_Materials UNION ALL SELECT MaterialID, MaterialName, LocationID, 'EU' AS Location, Quantity FROM EU_Materials UNION ALL SELECT MaterialID, MaterialName, LocationID, 'APAC' AS Location, Quantity FROM APAC_Materials
When to Use:
Only when variant datasources have significantly different schemas.
When data must be queried from truly incompatible sources.
Generally avoid for cloud platforms due to performance implications.