Introduction

This section describes how to display the list of database. Displaying list from database means that the corresponding API or database view will execute to fetch the required data from the respective database. Thus, the API or database view will display the data on the screen or page of the mobile app.

It has been extensively discussed in the heading section: Configuring a List (under the Configuring a Dashboard section) that you can display the data in the mobile app list by using two components: API or database view. Apart from designing the layout of a list in the vDesigner application, technical team implements the code of the API or database view externally. Therefore, you can use these two components to display the list in the mobile app as follows:

Case1:- (API Call or Invocation)

If you choose to display the list by using REST API, you need bind the API to the UI object (For example: – Submit or View button) that the mobile app user clicks to view the list. On the click of the respective button, you need to configure the API call as a result of load new object. After you configure the API call, the API will execute to fetch the data from database and then store it in the array object.

When user clicks the Submit or View button, the array type JSON object will display the data in the respective fields in the mobile app.

Case2:- (Using database view)

If you choose to display the list by database view, you need to enter the details of database view when you configure a list in the vDesigner application. In the details of the database view, you need to enter the name of the database view and the name of primary keys that are used to fetch data from the respective data source.

Before discussing these two cases, let’s discuss how to bind an API call to a bottom button (For example: – Submit or View) so that when mobile app user clicks the respective button, the API executes to fetch the data and then display it in the list.

Was this article helpful?
YesNo