Create a Customer List Page in an MDK App
Use the mobile development kit page editor to create a new page for displaying a customer list.
Overview
You will learn
- How to create a new page and add some controls to display customer information
- How to navigate from one page to another page
Prerequisites
Steps
Intro
To enhance your MDK app with customer list information, you need to carry out the following tasks:
- Create a new customer list page
- Add Contact Table control to the page
- Create a new navigation action to the customer list page
- Add a new button on main page and navigate to customer list page when user clicks it
- Deploy the app metadata to SAP Mobile Services & Cloud Foundry
- Update the app with new changes

This page is a searchable list that displays all customers.
To create the Customer List page, you will create a Section page and drag the Customer Contact Table control onto the page. In the property palette, you will link the control to the Customer Collection and then map data and actions to different areas of the cell object in the property palette. One nice feature about the Contact Table control is that it has icons that can activate device functionality such as phone, email, video and more.
In the project, right-click the Pages | MDK: New Page.

MDK Select | Section and click Next.

MDK You can find more details about the Section Page in this documentation.
Enter the page Name as
Customers_List, and click Finish.
MDK Once the page opens in the page editor, click on the white area to select it’s Action Bar, and set the Caption to Customers.

MDK In the Layout Editor, expand the Controls | Data Bound Container group, drag and drop the Contact Table control onto the Page area.

MDK In the Target section, provide the below information:
Field Value ServiceSelect com_sap_edm_sampleservice_v4.servicefrom the dropdownEntitySetSelect Customersfrom the dropdown
MDK In the Properties pane, click the link icon to open the Object Browser for the Description property. Double click the
Cityproperty of the Customer entity to set it as the binding expression and click OK.
MDK Be careful not to select
CityfromAddress (ESPM.Address).
MDK Remove the default value for the
DetailImageproperty. Repeat the above steps forHeadlineandSubheadlineproperties binding toLastNameandFirstNameproperties of the Customer entity respectively.You should have final results as below.

MDK In the Search section of the Properties pane, change both the
SearchEnabledandBarcodeScannerproperties to true.
MDK In the Data section of the Properties pane, click Add to add a new activity item.

MDK Expand the added item, click the dotted icon to open the Object browser to bind the
ActivityValueto thePhoneNumberproperty of the Customer entity.
MDK Similarly, add one more activity item, select Email from the dropdown and bind it to
EmailAddressproperty of the Customer entity.
MDK
Now, you will add a button on the Main page and from there, you will navigate to the Customers_List.page.
In the
Main.page, expand the Controls | Static Container group, drag and drop the Button Table control onto the Page area.
MDK Container includes controls that act as containers for other controls, such as container items. A container is constant across all pages. The size of a container depends on the controls and contents it contains.
Expand the Static Items section of the Controls palette.
Drag and drop a Button onto the Button Table container on the page.

MDK Each static container type in a Section Page can contain specific controls (static items).
You can find more details about Container and Item it may contain in this documentation.
In the Properties pane, provide the below information:
Field Value ImageClick link icon to open the browser and bind it to customerSAP iconTitleCustomers
MDK Imageproperty is referencing to the SAP font icon.Under Events tab, click the dotted icon for the
OnPress Handlerproperty and select theCreate a rule/action.
MDK Keep the default selection for the Object Type as Action and Folders path.

MDK Choose UI in Category | click Navigation | Next.

MDK In the Base Information step, provide the below information and click Finish.
Field Value NameNavToCustomers_ListPageToOpenSelect Customers_List.pagefrom the dropdown
MDK
You will now deploy the updated project to your MDK client.
Click the Deploy option in the editor’s header area, and then choose the deployment target as Mobile Services

Make sure you are choosing the right platform tab above.
Tap Check for Updates in the user menu on the Main page, you will see a New Version Available pop-up, tap Now.

MDK You will notice the newly added section button on the Main page. Tap Customers.

MDK Here, you will see list of all the Customers. You can search a record by by First Name or Last Name or City. Controls are rendered natively on device, you can email to the customer, make a phone call etc.

MDK Here, you may notice that City is not showing up on screen, this is by design. In portrait mode, the device width is considered compact, if it was a tablet device (where both portrait and landscape are considered regular instead of compact) you would see City on either orientation.
Tap Check for Updates in the user menu on the Main page, you will see a New Version Available pop-up, tap Now.

MDK You will notice the newly added section button on the Main page. Tap Customers.

MDK Here, you will see list of all the Customers. You can search a record by by First Name or Last Name or City. Controls are rendered natively on device, you can email to the customer, make a phone call etc.

MDK Here, you may notice that City is not showing up on screen, this is by design. In portrait mode, the device width is considered compact , if you change device orientation to landscape mode, you will see City.

MDK If it was an iPad (where both portrait and landscape are considered regular instead of compact) you would see City on either orientation.
Resources
Discussion
Share feedback on this tutorial or join the conversation in SAP Community.