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:

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.

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.

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.

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.

Open the page you want to configure using Open Page Designer.

Select the control you want to configure and then click on the ‘Bindings’ tab on the right panel.

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.

Click anywhere on the designed page to save changes and repeat steps 1-3 for other controls.