Bulk updating data store?

I need to go through hundreds of records in data-store and modify them (flipping a binary to mark them as inactive)

I’m storing a chat history as part of a chatbot. Each row is currently a single message. When a user decides to /reset their account, I clear out the previous messages by marking them all as inactive, but this costs me hundreds of operations.

Is there a way to do a bulk edit? Thanks!

How experienced are you with manually hitting APIs? Make has an API for Data Stores, you can pull the records in 1 go (or for a lot of records, in chunks for 1-200 per operation) using the Make > Make an API call module and this endpoint: Make Public API

As for bulk updating, you could arrange your edited data into an array and use Make Public API I think (please backup your data store first).

Alternatively, you could try an iterator into an array and then update via the usual Data store, but that gets fiddly.

Updating more than one Data Store record per module is not possible.

That’s a great idea! I’m sure others would agree that this is a nice feature to have.

You can submit this suggestion to the Idea exchange, under App improvement ideas

Don’t forget to search for it first, just in case someone already suggested it, so that you don’t end up creating a duplicate.
Screenshot_2024-01-17_130153

Hope this helps! Let me know if there are any further questions or issues.

@samliew

P.S.: Investing some effort into the Make Academy will save you lots of time and frustration using Make.