Bulk Operations

Bulk operations lets you modify a chunk of data at once, in the editor. While it can be undone with backups, this is dangerous operation and should only be done when you need to modify production data at once.

Defining an API endpoint

To operate some action on your data, you need to define some API workfows that you will call from the Data Tab, in the editor. The process starts by heading to the API page of your app, and create an internal endpoint (it doesn't have to be exposed) that takes one parameter and does some action with it. The parameter type should be the type of data you want to process. Such an API workflow should not take another parameter, as when the bulk operation is running, it will call this workflow with the thing as the only parameter.

Let's say you have an app with a type 'House', and a field 'unsold'. You realized afterwards that the unsold field should be set to yes for all houses, including the entries already created in the database. Here is what the necessary workflow will look like.

and here is what the action would do, modifying the house sent as a parameter.

Once you are done with this part, you can head to the Data Tab, App Data section and select a view that shows houses. Clicking on Bulk Operation will reveal the Bulk Operation Popup, which lets you define which entries you want to process, and which workflow should be used. You can process the entire view, or only select some entries in the table and run the workflow on these selected entries.

Note that this operation permanently modifies your data, and can take some time if you are processing thousands of entries.

results matching ""

    No results matching ""