top of page
Search

What's up with Bulk Deleting in a Knack App?

Only in Knack's Classic Builder, not available yet in NextGen.


When you're managing large amounts of data in a Knack workflow app, one of the most painful limitations is having to delete records one by one. If you've ever dealt with tens of thousands of entries piling up every month, you know what I mean.


Recently I had a client ask for the ability to perform bulk deletes directly from the front-end of their app. They were using Knack Classic (not Next Gen) and relying heavily on KTL, so I dove into the process. What I learned was surprisingly powerful—and in this post, I'm going to walk you through exactly how I did it.


Why Bulk Delete Was Needed

I first ran into this use case with a company that manages large public events—home shows, senior expos, things like that. Visitors can pre-register online through a Knack form, which means the database quickly fills up with tens of thousands of records every single month.


Once a show is over, the team exports those registrants, stores them elsewhere, and then clears out the form entries. But doing this manually—record by record—was slow, frustrating, and unnecessary.


They didn’t want it automated yet, but they did need a faster manual option from the front-end. And since they were running Knack Classic and using KTL, I knew we could do this.


Preparing the Knack App for KTL Bulk Operations

If you’re familiar with KTL, you know the first step is always the code block. I won’t go deep into that here—there are plenty of videos that cover the boilerplate you need to insert into the page—but the core idea is simple:


You have to include the base KTL setup code, and then configure the bulk operation settings.


Once the main KTL script is added, we can make some quick adjustment to get it to work.


Turning On Bulk Delete in KTL

By default, bulk delete is turned off. To enable it:

  1. I navigated to the bulk operations section within the KTL config.

  2. I switched bulkDelete from false to true.

  3. Then I selected the list I wanted to modify—my expense list in this case.


After that, I jumped into the settings for the page where the delete action lives.

KTL relies on specific keywords for actions like edit and delete, so I copied the appropriate delete keyword into the page’s settings. In this case use: _edo=delete


For more details on KTL bulk operations and keywords, see this at their GitHub:


Setting Up the Required User Role

One thing I appreciated about KTL’s design is that bulk deletes are deliberately guarded. It’s very easy to mess up a large dataset if someone selects the wrong records.

So KTL requires a specific user role called Bulk Deletes.


Here’s what I did:

  1. Created a new user role named bulk deletes.

  2. Assigned it to my own user account.

  3. Ensured the delete action button existed on the list page.


Without all three of these pieces, bulk delete simply won’t activate.

Once everything was in place, I refreshed the page—and there it was.


Watching Bulk Delete Come Alive

After refreshing, I could see the new bulk delete functionality:

  • A checkbox next to each record

  • A “select all” option

  • A Delete Selected action button


I didn’t run the delete during my demo (I actually use this test app), but the workflow is instant and clean.


A quick note: bulk delete only applies to the items shown on the page. If your page is set to show 100 entries and the dataset is 1,200 items long, you’ll need to delete in batches—or increase the page size to something larger.


Something Unexpected

Here's the interesting part: I noticed that bulk delete was showing up on other pages even when I hadn't placed the keyword on those pages. It appears that KTL applies bulk delete anywhere the user has the appropriate role—even if the page wasn’t specifically configured.


I’m not entirely sure why, but the important thing is: it works, and it respects the user role you assign.


Just make sure you trust whoever has access to bulk deletes—they can do real damage if they’re not careful.


Final Thoughts

Bulk delete in Knack apps is absolutely possible with KTL, and once you understand the setup, it’s incredibly useful. Whether you're managing registration lists, logs, submissions, or anything that grows quickly, this method can save huge amounts of time.



Interested in my Knack database services? ... Book a call with me here: https://calendly.com/daveparrish/callwithdave 






 
 
 

Comments


bottom of page