Exclude file from table with dataviewjs

I found this dataviewjs snippet online and would like to exclude a certain file from the results. The file is called “My Inputs” and is in the same folder as the other files.

const {fieldModifier: f} = this.app.plugins.plugins["metadata-menu"].api;

dv.table(["Source", "Status"],

await Promise.all(dv.pages('"Spaces/My School/My Inputs"').map(async p => [

await f(dv,p, "Source"),
await f(dv,p, "Status")])

How would I go about doing this. Thanks in advance.

No worries ChatGPT fixed it for me

I’m leaving the code here if anyone has the same issue

const { fieldModifier: f } = this.app.plugins.plugins["metadata-menu"].api;

const tableData = await Promise.all(
  dv.pages('"Spaces/My School/My Inputs"').map(async (p) => {
    if (p.file.name === "My Inputs") return null; // Skip the file "My Inputs"

    return [
      await f(dv, p, "Source"),
      await f(dv, p, "Status"),

const filteredTableData = tableData.filter(Boolean);

dv.table(["Source", "Status"], filteredTableData);

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.