Using ‘Binding’ to Display Data from Entities

All the controls you have on a page can be configured to display data from a data source. Through connectors, you can display data retrieved from entities or configure controls such as List Views and Labels.

There are currently four properties that you can use while data binding:

  1. Value – This is the default attribute for all controls. It maps to the most common property. For instance, it can set the text that appears in Text Boxes.
  2. IsVisible – Another common attribute, it can be used to show or hide a control based on criteria. For example, specific boxes will only appear if a particular value had been selected in a picker control.
  3. DataSource – This attribute allows you to configure data sources to be used for controls such as Pickers, Segmented Controls, List Views, and Auto-Complete Text Boxes.
  4. TextColor – Binding expressions to this property allows you to update the text color of certain buttons or labels based on certain criteria.

To display data from entities using the data binding feature, use the following steps.

  1. Open the page you want to configure using Open Page Designer.
  2. Select the control you want to configure and then click on the ‘Bindings’ tab on the right panel.
  3. Press ‘+ Add’ in order to configure the binding. Next, specify the following:
    • Attribute – Select from the four attributes mentioned earlier.
    • Binding Type – Choose whether the binding should be Literal (the exact match of value is required), Property (used as a property), or Expression (logical decision-making is undertaken via an expression).
    • String Format – Specify the format of the output results if necessary. For instance, you can type ‘{dd MMM yyyy}’ for the date to be displayed as ’10 MAR 2020′.
    • Value – Type an expression using keywords and functions to specify which data will be displayed.
  4. Click anywhere on the designed page to save changes and repeat steps 1-3 for other controls.