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
  • 1. Data mutation
  • Introduction
  • Note
  • 2. Batch mutation
  • Introduction
  • Note
  • 3. Actionflow
  • Introduction
  • Note
  1. Actions

Request

Add, update, or delete single or multiple records in a data table.

Request actions enable direct operations on the database, including adding, updating, deleting records, and executing pre-defined actionflows. Momen supports three types of request actions: data mutation, batch mutation, and actionflow.

Request action includes:

  1. Data mutation

  2. Batch mutation

  3. Actionflow

1. Data mutation

Introduction

It is used to perform the adding, updating, and deleting of records in the database.

  1. Insert: Add data to the database.

    1. Single insert

    2. List Mutation

  2. Update: Update the data in the database that meets the filtering criteria.

  3. Delete: Delete data in the database that meets the filter criteria.

Note

  1. List mutation When you choose to add data, you can enable the "List Mutation" for batch adding. It needs to identify a data source with multiple data.

  2. On conflict When adding or updating data, you can configure actions when data conflicts occur. If a data field has been constrained to be unique, you can configure whether you want to keep updating the conflicting data (by setting the constraint action type to Update) or take no action (by setting the constraint action type to None).

  3. On success/failure On success/failure refers to the actions triggered after a data mutation action is successfully or unsuccessfully executed. It plays a crucial role in real-world applications. Typically, after modifying table data, you can configure Show Toast, Refresh, or Redirect actions to notify users of the operation. Additionally, you can chain subsequent actions, such as another data mutation or set conditional branches to execute corresponding actions, depending on the specific scenario.

  4. Results data Upon successful execution, result data is generated, which contains the newly added or updated record, including its ID and other details.

2. Batch mutation

Introduction

Batch mutation is used to create a transaction consisting of multiple database operations.

Note

  1. Transaction Rollback: If any operation within the transaction fails, the entire transaction will be rolled back. For example, if three operations are configured and the third one fails, all preceding operations will be undone.

  2. This action is suitable for scenarios requiring strict data integrity during complex modification processes.

Introduction

Executes a pre-configured actionflow to implement a sequence of actions or complex logic and events.

Note

Result Data: If the actionflow has defined output parameters, the output will be available as result data for further use. For example, if the actionflow generates a random number between 0 and 100, and you want to use this number, first define an integer-type Page Variable on the page. Then, on success, add a Set Page Variable action to assign the output parameter to that page variable.

PreviousOverviewNextNavigation

Last updated 1 day ago

3.

Actionflow