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
  • Introduction
  • Action configuration guide
  • About Momen​​​​​
  1. Actions

Loop

Using remote variable (with a limit greater than 1) or select view (multiple choices) as the data source, retrieve the data from the data source and process it one by one.

PreviousConditionalNextPublish Application

Last updated 1 day ago

Introduction

This feature enables processing items in an array data source one by one (only remote data and select views are supported as data sources). It is ideal for tasks such as updating database entries or calculating total shopping cart values.

Action configuration guide

Taking the calculation of the total value of a shopping cart as an example:

  1. Add Page Variable Start by adding an "Arbitrary Precision Decimal" page variable to the page to temporarily store calculation results, initially set to zero. If this default does not work, set it to zero during the page load.

  1. Add Data Source On the page, identify a table as a data source so that the page will request the shopping cart data, filtered by the current user ID as the buyer.

  1. Configure Loop Action Upon successful data retrieval, configure a loop action. Use the fetched data to multiply each item's "purchase quantity" by its "price," and add the product to a running total in the page data.

  • Example Calculation: Start with the total at 0. If the first cart item's quantity is 2 at a price of 100, the total becomes 200. For the next item with a quantity of 3 and price of 200, the new total becomes 800.

  • Further Operations: During the loop, each data item from the remote source can be accessed in "Item Data" for additional processing.

About Momen​​​​​

is a no-code web app builder that allows users to build fully customizable web apps, marketplaces, Social Networks, AI Apps, Enterprise SaaS, and much more. You can iterate and refine your projects in real-time, ensuring a seamless creation process. Meanwhile, Momen offers powerful API integration capabilities, allowing you to connect your projects to any service you need. With Momen, you can bring your ideas to life and build remarkable digital solutions, getting your web app products to market faster than ever before.​​

Momen