Momen Docs
Go to Momen
  • Get Started
    • Introduction
    • Quick Start
    • Software Development Process
    • Editor Overview
  • Changelog
    • Latest Product Update
  • Build UI
    • Pages
    • Components
    • Canvas
    • Layout
    • Component - Display
    • Component - Input
    • Component - View
    • Component - List
    • Component - Tab View
    • Component - Select View
    • Component - Conditional View
    • Component - Others
    • Component - Map
    • Custom Component
  • Data
    • Overview
    • Data Model and Database
    • API
    • Variable
    • Parameter
    • Formula and Conditions
  • Actions
    • Overview
    • Request
    • Navigation
    • Actionflow
      • Custom Code
      • Database Trigger
    • AI
      • AI Data Model
      • AI Point
      • Vector Data Storage and Sorting
    • User Actions
    • Component Management
    • App and Page Management
    • Toast Notifications & Modal
    • Payment
    • SSO
    • Share
    • Location
    • File Management
    • QR Code
    • Clipboard
    • Conditional
    • Loop
  • Release and Growth
    • Publish Application
    • Upgrade Project
    • Multiple Clients
    • Permission
    • Log Service
    • SEO
    • Hosting Files
  • My Account and Community
    • My Wallet
    • Promoting Momen
    • Code Component
    • Collaboration
  • Debugging
    • How to Debug in Momen
    • Request Error Reference
  • Tutorial
    • How to Build an AI Needs Analysis Project?
    • How to Set Up Payment with Stripe Plugin?
    • How to Embed an Iframe Component into Your Momen Project?
    • How to Build Your Login Page?
    • How to Convert Momen App to Native Mobile App?
    • How to Build a CMS (MVP Version) in Hours?
    • How to Set a Countdown Timer When Sending a Verification Code
  • Template
    • AI Mental Health Assistant
    • Angry Dietitian
    • AI Help Center
    • AI Knowledge Base
    • SaaS Corporate Site
    • Blog
    • AI Feedback Tool
    • Feedback Tool, a Nod to Canny
    • Portfolio
    • Online Courses, a Nod to Udemy
    • Mobile Auto Repair AI Scheduler
Powered by GitBook
On this page
  • Data Sources
  • Data Query and Modification
  • Data Query
  • Data Modification
  • Referencing via Variables
  • Passing via Parameters
  1. Data

Overview

Learn to build Momen applications that retrieve, display, and update data from various sources.

PreviousCustom ComponentNextData Model and Database

Last updated 1 day ago

Data is the core asset of an application, which is essentially about managing and processing it. Momen provides flexible and powerful data management and utilization capabilities, with the framework as follows:

Data Sources

Momen supports a variety of data sources, including built-in databases, APIs, and more.

  • Environmental Data: This refers to data provided by the environment in which the program is running, mainly including the following categories:

    • Null Types: Null, Empty Text, Empty Array.

    • Time Types: Current time, date, and datetime.

    • User Types: Logged-in user data (automatically retrieved from the database, can be re-fetched using the "Refresh Login User Data" action), login status (boolean), user agent (browser/operating system information).

  • Contextual Data: Mainly includes the following two types:

    • Action Result Data: Many action operations generate result data, which can be referenced by subsequent actions. For example, after calling the database "add data" action, the result of the addition will be returned; after calling an API action, the interface will return response data.

    • List Item Data: When a List View or Select View is bound to a data source, each list item has its corresponding data. This data can be used in various operations of the list item, such as displaying content, responding to user interactions, etc.

  • Input Components: Momen provides various input components that can be used as data sources, including: Input, Data Selector, Image Picker, and Select View, etc. Please refer to the documentation of the relevant components for details.

Data Query and Modification

Once the data source is determined, it can be used by components and actions.

Data Query

1. Add a Data Source

Open a page, go to "Data," and "Add Data Source."

2. Set Filters

If obtaining data from a database, you need to determine the following:

Tables: You can select all system tables and developer-created tables.

Request Type: Two types are available.

  • Query: Obtain data once when the page loads (suitable for most scenarios).

  • Subscription: Obtain data once when the page loads, and when data in the database meeting the condition changes, it will be automatically pushed to the page (suitable for automatically obtaining the latest chat records and other specific scenarios).

Data Limit: Refers to the maximum number of data entries to obtain, ranging from 1 to unlimited.

  • If it is 1, a single record entry is returned.

Data Filters: Multiple filters can be configured.

  • Conditional: The condition for filtering; the filter that meets the condition will take effect.

  • Filter: Refers to obtaining data that meets the filter condition when extracting data from the database.

  • Deduplication: Remove duplicate data; multiple deduplication fields can be selected.

3. Use Queried Data

The queried data can be used in the "Page Data" and "Data Source" sections of the data selection menu.

Data Modification

The system provides comprehensive operations for data addition, deletion, and modification. Before performing these operations, please carefully check and confirm the filter conditions to avoid unexpected situations (e.g., deleting all data, updating all data to the same entry, etc.).

Referencing via Variables

Passing via Parameters

Data Model and Database: Momen provides a powerful relational database that is flexible and offers excellent performance. See details:

API: External data sources are typically accessed via APIs. See details:

On pages and components, you can query database data or obtain external data through APIs. The following example of a page data source explains how to query and use data (for component data sources, please refer to , , and other documents).

If it is greater than 1, an array is returned. To retrieve a specific data entry, you can use the GET_ITEM formula (see details: ).

Sort: Choose to sort based on a specific field. If vector storage is enabled for the field, vector sorting can be performed (see details: ).

To achieve data reuse, data can be stored in variables. For more details, see: .

Data transmission (e.g., between pages) can be achieved using parameters. For more details, see: .

Data Model and Database
API
List
Select View
Formula
Data Model and Database
Variable
Parameter