LinkedIn
Copied!

Table of Contents

Specifying a data source in a control

Version:

Only available versions of this content are shown in the dropdown

Improve the maintainability of your application by defining sources for the values that populate controls. For example, you can configure an autocomplete control to display a list of employee names and their employment types that are sourced from a data page.

When you tie a control to a list source, the values in the control change automatically to reflect the state of the source, which saves development time.
  1. Open the view that you want to edit.

    For more information, see Accessing views in your application.
  2. In the configuration pane on the right side of the window, hover over the control, and then click the Edit icon.

  3. On the General tab of the control, in the List source section, select the list source:

    Choices Actions
    Use the data source that is configured for the associated property to populate the control with values at run time In the Type list, select As defined on property.

    For more information, see Specifying a data source directly in a property.

    Use a data page to populate the control with values at run time
    1. In the Type list, select Data page.

    2. In the Data page field, specify the data page that you want to use as the source of the list values.

      Select a page of the list type, for example, D_LoadEmployees. For more information, see Data page types.
    3. In the Data source property field, specify the property from which you want to source the list.

      For the D_LoadEmployees data page, select pyName and pyEmployeeType properties.
    4. Optional:

      To limit the results that you want to display if your data page has parameters, in the Value column, for each parameter, specify values that you want to use as a filter.

    Use a clipboard page to populate the control with values at run time
    Use this option especially for referring to dynamic data, such as lists of customers that are eligible for certain types of offers.
    1. In the Type list, select Clipboard page.

    2. In the Clipboard page field, specify the clipboard page that you want to use as the source of the list values.

      Ensure that the clipboard page is available on the clipboard at run time.
      Select the Emp clipboard page to populate employee details.
    3. In the Data source property field, specify the property from which you want to source the list.

      Select the pyName property to populate the list with employee names.
    Use a report definition to populate the control with most recent values at run time
    1. In the Type list, select Report definition.

    2. In the Applies to field, specify the class from which you want to extract the report.

      Select the Data-UIGallery-RepeatingLayouts-EmployeeDetails class, which contains a report with employee details
    3. In the Report definition field, specify the report definition that you want to use as the source of the list values.

      Select pyEmployeeDetails to fetch data from a report with employee details.
    4. In the Data source property field, specify the property from which you want to source the list.

      Select the py.Name property to display employee names.
    5. Optional:

      To limit the results that you want to display if your report definition has parameters, in the Value column, for each parameter, specify values that you want to use as a filter.

  4. Click Apply.

Have a question? Get answers now.

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