If you're encountering the "You must use a Chrome or Safari browser" error when running the ODK-X Application Designer, you are not running the latest version - please update to v2.1.11

Logo

Getting Started

  • Selecting the Appropriate Tool Suite
  • Installing ODK-X Basic Tools
  • Trying Out ODK-X Survey
  • Trying Out ODK-X Tables
  • Getting Started Building an Application
  • Example Applications
    • Geographic Health Survey App
      • Key Features
      • Installing EpiSample
      • Guided Tour
        • EpiSample Guided Tour
    • Longitudinal Clinic Study App
    • Inventory Management and Maintenance App
  • Troubleshooting

Building your own Application

  • Building an Application
  • ODK-X Application Designer
  • Setting Up ODK-X Application Designer
  • Using ODK-X Application Designer
  • ODK-X XLSX Converter
  • ODK-X Tables Web Pages
  • ODK-X WebKit

Mobile Apps

  • ODK-X Survey
  • ODK-X Tables
  • ODK-X Services
  • ODK-X Notify

Cloud Apps

  • ODK-X Cloud Endpoints
  • ODK-X Sync Endpoint
  • Setup ODK-X Sync Endpoint with Cloud Services
  • Setup ODK-X Sync Endpoint Manually
  • Users and Groups

Desktop Apps

  • ODK-X Suitcase

Advanced Topics

  • Advanced Application Building Topics
  • Platform Developer Advanced Topics

Contributing

  • Contributing to ODK-X Docs

Currently Not Supported

  • ODK-X Scan
  • ODK-X Scan Form Designer
  • ODK Aggregate Tables Extension
ODK-X
  • Example Applications
  • Geographic Health Survey App
  • EpiSample Guided Tour
  • Main Menu
  • Edit on GitHub

Main Menu

Main Menu

Function

The Main Menu module is the hub to launch the other modules. The currently selected place name is displayed along the top for convenience.

The buttons that launch other modules can be dynamically added and removed via the Settings screen in the Configuration module.

Implementation

The file assets/eps_main_menu.html is launched by the Select button in the Configuration module. It provides a basic skeleton for this UI, but most of this screen's elements are dynamic. They are defined in assets/js/eps_main_menu.js.

The file eps_main_menu.js creates the buttons to launch the various modules of this application. It selectively hides these buttons if the configuration dictates this (see the init() function). It also handles setting up the state for launching each of these modules.

To launch the Village Geographic Survey (with the Collect button), no setup is required. A direct call to odkTables.launchHTML(...) will suffice. This is true of the Task List Generation (with the Select button) as well.

To launch the Geographic Navigation, a query must be passed that selects the points to which this particular user should navigate. The call happens with this function: odkTables.openTableToNavigateView(...) which queries the Census table for these points (see the Village Geographic Survey for how this table is populated). The preceding code dynamically generates the SQL WHERE clause and SELECT arguments. This view is also opened with a dispatchStruct, which triggers the Action-Callback workflow.

The launch of the Geographic Navigation is automatic, unlike the manual button pressing of the other modules. This occurs via the Action-Callback workflow triggered when the Navigation module is launched. See the actionCBFn() function and the odkCommon.registerListener(...), odkCommon.viewFirstQueuedAction(...), and odkCommon.removFirstQueuedAction(...) functions. When the Navigation module completes its action, the result is handled by this function. If the result indicates to do so, the Household Survey module will be launched via odkTables.editRowWithSurvey(...) (using the configured Form ID).

The Household Survey is also launched with the Action-Callback workflow. When it returns, the results are used to update the Census table to match its corresponding form's completion status.

The currently selected location is displayed at the top by reading the value from localStorage.

Files

  • assets/eps_main_menu.html

  • assets/js/eps_main_menu.js

Forms

None

Database Tables

  • Config

  • Census

Configuration Village Geographic Survey

Download this documentation as a PDF.

For video tutorials, you can check out our YouTube Channel

If you still need help, you can ask support questions in the ODK-X Forum

If you find a problem with this documentation, please file an issue

You are also encouraged to fork our Github repo and become a contributor

© Copyright 2023, ODK-X. This document is licensed under a Creative Commons Attribution 4.0 International License..

Built with Sphinx using a theme provided by Read the Docs.