Examples

The Mobile SDK feature is currently available for preview only for selected users.

Examples

The code snippets given below demonstrate how to call the different methods.

  1. Example 1 - This sample is for fetching the list of all sections present in an application.

    Fetch Section List of particular application

    try {

    ...

    ZCApplication firstApp = appList.get(0);

    List<ZCSection> sections =

    ZOHOCreatorUtil.getApplicationDetails(firstApp);

    } catch (ZCException e) {

    e.printStackTrace();

    // Handle Error

    }

  2. Example 2 - This sample is for fetching the meta-data of a particular form.

    Accessing Form

    try {

    ...

    ZCSection firstSection = sections.get(0);

    ZCComponent firstComponent =

    firstSection.getComponents().get(0);

    if(firstComponent.getType().equals(ZCComponentType.FORM)){

    ZCForm form = FormUtil.getForm(firstComponent);

    }

    } catch (ZCException e) {

    e.printStackTrace();

    // Handle Error

    }

  3. Example 3 - This sample is for fetching the meta-data of a particular report.

    Accessing Report

    try {

    ...

    ZCSection firstSection = sections.get(0);

    ZCComponent firstComponent =

    firstSection.getComponents().get(0);

    if(firstComponent.getType().equals(ZCComponentType.REPORT)){

    ZCReport report = ReportUtil.getReport(firstComponent);

    }

    } catch (ZCException e) {

    e.printStackTrace();

    // Handle Error

    } catch (CloneNotSupportedException e) {

    e.printStackTrace();

    }

Share this post : FacebookTwitter

Still can't find what you're looking for?

Write to us: support@zohocreator.com