LinkedIn
Copied!

Table of Contents

Configuring multiple data sources for a data page

Version:

Only available versions of this content are shown in the dropdown

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.

  • Ensure that the data page for which you want to configure multiple data sources has parameters. For more information, see Use case: Referencing data in a data page by using parameters.
  • Create When conditions and configure the parameters. Data pages use a When condition and the parameter values that the referencing page submits to determine what data to send back. For more information, see When Condition rules.

When an application invokes a data page, it sends values for one or more data page parameters. The data page uses the parameter values to select which of its data sources to use to respond to the current call, and which data from that data source to return.

  1. In the navigation pane of Dev Studio, click Records.

  2. Expand the Data Model category, and then click Data Page.

  3. Click the name of a data page to open the page.

  4. 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.
    1. 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.

    2. Optional:

      To delete a source, click Delete item.

      You can delete all but one data source.
    3. 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.

    The data page is prepared to respond to references that are sent with parameter values by returning data designed for the needs of each reference. The data page can create a separate instance of itself on the clipboard for each time it is referenced with unique parameter values. Additionally, the data page can restrict the number of data page instances to one, so each new reference overwrites the data page instance on the clipboard.

Related Content

Have a question? Get answers now.

Visit the Collaboration Center to ask questions, engage in discussions, share ideas, and help others.