Sources of data for your UI
You can automate the sourcing of content for tables and picker controls by defining sources for the values that populate the tables and controls at run time. For example, in a delivery form, you can configure a radio button control group to display the values from the D_CustomerDeliveryAddresses data page so that the customer can choose the most convenient option for a particular order.
You can configure a data source for your UI element at the following levels:
- A property. For more information, see Specifying a data source directly in a property. The term
propertyis used in Dev Studio context. To refer to
propertiesin App Studio, we use the term
- A picker control. For more information, see Specifying a data source in a control.
The UI Gallery landing page contains working examples of the picker controls. For more information, see Accessing the UI Gallery.
- A table. For more information, see Creating a table layout with code optimization.
- Levels of configuration for data sources
UI elements can have different sources of data. You can configure the available options at the level of a pricker control, a property, or a table, depending on your needs.
- Data page as a source of data
You can tie a data page to a UI element of you application to access data from a range of sources on demand. For example, you can configure a field for customer information to draw data from the D_Customer data page, and not directly from the database.
- Report definition as a source of data
You can populate your UI elements such as tables, drop-downs, and auto complete controls with data that the report definition query returns. For example, you can source data for an autocomplete control from the results of a report definition to display service provider names and locations.
- Specifying a data source in a control
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.
- Specifying a data source directly in a property
Make the development process more convenient by defining the source of data for a control directly in a property that populates the control with values at run time. For example, you can configure a drop-down menu to display the contract type property.