Skip to main content

 –

Specifying a data source in a control

Suggest edit Updated on December 1, 2021
Applicable to Theme Cosmos applications

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:
    ChoicesActions
    Use the data source that is configured for the associated property to populate the control with values at run timeIn 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.
      Note: 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 example: 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 timeNote: 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.
      Note: Ensure that the clipboard page is available on the clipboard at run time.
      For example: 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.For example: 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.For example: 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. For example: 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.For example: 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.
Did you find this content helpful? YesNo

Have a question? Get answers now.

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

Ready to crush complexity?

Experience the benefits of Pega Community when you log in.

We'd prefer it if you saw us at our best.

Pega.com is not optimized for Internet Explorer. For the optimal experience, please use:

Close Deprecation Notice
Contact us