Request
Add, update, or delete single or multiple records in a data table.
Last updated
Add, update, or delete single or multiple records in a data table.
Last updated
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:
Data mutation
Batch mutation
Actionflow
It is used to perform the adding, updating and deleting records of the database.
Insert: Add data to the database.
Single insert
List Mutation
Update: Update the data in the database that meets the filtering criteria.
Delete: Deletes data in the database that meets the filter criteria.
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.
On conflict When "Add" or "update" data, you can configure actions when data conflict. If a data filed has been constrained to unique, you can configure whether you want to keep updating the conflict data (by setting the constraint action type to Update) or takes no action (by setting the constraint action type to None).
On success/failure On success/failure refers to the actions triggered after an action (namely data mutation action) is/not successfully 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.
Results data Upon successful execution, result data is generated, which contains the newly added or updated record, including its ID and other details.
Batch mutation is used to create a transaction consisting of multiple database operations.
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.
This action is suitable for scenarios requiring strict data integrity during complex modification processes.
Executes a pre-configured actionflow to implement a sequence of actions or complex logics and events.
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.