Display Related Data in Your App

When you work with related data (for example, categories and their respective items), you can represent it by creating linked views or by showing information about the relation.

This article contains the following information:

This operation is applicable to apps that use a Backend Services, a Progress Data Service, or a Progress Sitefinity data provider.

You can link static or dynamic content types which have a hierarchical relation (one of the content types is a parent to the other). For example, blogs and blog posts.

If you need to represent related data (for example, categories and their respective items), you can link two Master Detail views or two Progress Sitefinity-based views to create a list in which every item opens a second filtered list. For example, you can use linked views in a shopping app to list the available brands on one screen and the available items for a selected brand.

The primary view is the list which opens another list view with filtered content. When you work with hierarchical data, this list is bound to the parent data type or object. For example, the brands in a shopping app.

The secondary view is the filtered list view opened by tapping a list item in the primary view. When you work with hierarchical data, this list is bound to the child data type or object. For example, the available items per brand in a shopping app.

To link views, complete the following steps:

  1. On the Data Providers tab, verify that you have configured one of the following data providers:

  2. On the Manage Views tab, verify that you have created two Master Detail views or two Progress Sitefinity-based views.

  3. If you are using Master Detail views, verify that you have bound their list views to their respective content types.
  4. Open the primary view.
  5. In the Master Detail View panel, navigate to the List Screen section and expand Item Action.
  6. Select Open existing view with related content and from the drop-down list, select the secondary view.
    If you are using a Progress Sitefinity data provider and the drop-down list is empty, the hierarchical relation between the content types is not configured properly. Make sure that one of the content types is a parent to the other and try again.
  7. Provide the required relation data, based on your data provider:
    • Backend Services: In the <secondary view> identifier fields drop-down menu, select the relation field which links the two content types. For example: myBrandID.
    • Progress Data Service: In the <secondary view> identifier fields text box, provide the integration name for the relationship between the core objects. For example: R123456789.
      In the <primary view> field that refers to <secondary view> text box, provide the integration name for the field which connects the core objects. Usually, this is the id of the core object bound to the primary view.
    • Progress Sitefinity: No additional data configuration required.
  8. Apply all changes.
  9. (Optional) Remove the secondary view from the navigation.
    1. Open the Master Detail view or the Progress Sitefinity view that you want to remove from the navigation.
    2. In the Master Detail View panel, navigate to the General section and expand Navigation.
    3. Deselect the Include this view in the app navigation check box and apply the change.

Display Data Relations

This operation is applicable to apps that use a Backend Services or a Progress Sitefinity data provider.

If you need to represent related data (for example, categories and their respective items), you can do it by showing information about the relation. For example, for each item in a shopping app, you can show the brand or the item categories that the item belongs to.

To show data relations, complete the following steps:

  1. On the Manage Views tab, select an existing data bound Master Detail view or a Progress Sitefinity-based view.
  2. In the List Screen section, click Add field in the Custom Fields group and select Data list.
  3. Provide Name and Label and configure the label position.
  4. From the Data binding drop-down list, select a field.
    The Views service shows only fields related to the content type for the current view.
  5. Click pick a field and select a field which contains human-readable data.
    The Views service uses the selected field to display human-readable information about the data relation. For example, when you want to show the brand for an item in a shopping app, you can pick the field for the brand title.
  6. Click Apply.

To enable add and edit of data relations fields, complete the following steps:

  1. On the Manage Views tab, select an existing data bound Master Detail view or a Progress Sitefinity-based view.
  2. In the General section, expand the Options group and select Enable 'Create' screen and Enable 'Edit' screen.
  3. In the Create and Edit sections, click Add field in the Custom Fields group and select Multiple select.
  4. Provide Name and Label, configure the label position and select the display option.
  5. From the Data binding drop-down list, select a field.
    The Views service shows only fields related to the content type for the current view.
  6. Click pick a field and select a field which contains human-readable data.
    The Views service uses the selected field to display human-readable information about the data relation. For example, when you want to show the brand for an item in a shopping app, you can pick the field for the brand title.
  7. Click Apply.

See Also

Start a free trial Request a demo
Contact us: +1-888-365-2779
sales@telerik.com
Copyright © 2016-2017, Progress Software Corporation and/or its subsidiaries or affiliates. All rights reserved.