Skip to content
VaultLens Studio

Set up the archive flag and archive tables

VaultLens archives every record whose archive flag is Yes. The flag is a Yes/No field in your Knack table. VaultLens doesn’t decide which records to archive: you do, in Knack.

Add the flag field

You need one Yes/No field on each table you archive.

Let VaultLens create it:

  1. In the archive setup, go to Key and archive flag for each table.
  2. Next to a table with no flag chosen, click Create the Archive field for me.
  3. Sign in to Knack in the pop-up and approve.

VaultLens adds a Yes/No field called “Archive” and selects it. It starts as No on every record. VaultLens keeps that Knack access for 15 minutes so later steps don’t need another sign-in, then gives it up.

Or add it yourself:

  1. In the Knack Builder, open the table and add a Yes/No field. A name containing “archive” is picked automatically.
  2. In VaultLens, click Refresh schema on the app page, then choose the field under Archive flag (Yes/No).

For Knack HIPAA apps, add the field yourself.

Decide which records become Yes

Set up the rule in the Knack Builder. Common ways:

  • Conditional rule on the flag field (Builder → table → field → Rules): set it to Yes when, for example, Status is Closed and the date is over a year ago.
  • Scheduled task (Builder → Tasks) that flags matching records every night.
  • By hand or in bulk from a table view.

In the setup, click Check how many are flagged to see how many records are flagged now. It also warns if your chosen Key has blank or duplicate values in a sample of records.

Choose the CSV columns

Under CSV columns, untick fields you don’t want as readable columns. By default all fields are included. The full record is kept in the file either way, so it can be restored.

The archive tables in Knack

VaultLens may use two tables in your Knack app:

Table Used when What it holds
VaultLens Archive Runs Files are saved in your Knack app One record per file, with the file in an Archive File field, the run date, record count and checksum
VaultLens Archived Files You delete records that have file or image fields One record per file or image, so Knack keeps it and a restore can reattach it

To create them:

  1. In the archive setup, go to Where should archive files go?
  2. Under In this Knack app, click Set up the archive tables for me.
  3. Sign in to Knack in the pop-up. VaultLens creates whatever is missing.

You need VaultLens Archived Files to delete records with files or images, whichever destination you choose. Without it, the setting can’t be saved for deletion, and runs fail before deleting anything.

For Knack HIPAA apps, create the tables in the Builder yourself:

  • VaultLens Archive Runs with a File field named “Archive File”.
  • VaultLens Archived Files with a File field named “File” and an Image field named “Image”.

Then click Refresh schema on the app page.

Each table can be in only one archive setting at a time.