Configure multiple data sources in your data page and set parameters that determine which data source to use, so that your application gets the right data every time. By setting parameters in your data page, you eliminate the labor and maintenance cost of creating and maintaining hard-coded calls for data.
- In the navigation pane of Dev Studio, click Records.
- Expand the Data Model category, and then click Data Page.
- Click the name of a data page to open the page.
- To specify data sources for the data page, on the
Definition tab, in the Data
Sources section, click Add alternative
source for each data source that you want to add.The IF field is displayed above the first source in the list.
- In the IF field, identify the When condition
that evaluates whether the current reference to the data page requires
using the source identified in each row.If you add additional sources, the condition for each additional source is set as ELSE IF. You cannot use the same When condition for more than one source.
The condition for the final data source in the list is set as Otherwise. If all the preceding When conditions evaluate to false, the data page uses the final data source.
- Optional: To delete a source, click Delete item.You can delete all but one data source.
- Optional: To set the order in which the system checks whether the data sources should be used, click the left side of the data source to drag it higher or lower in the list.
- In the IF field, identify the When condition that evaluates whether the current reference to the data page requires using the source identified in each row.