Help converting DQL to dataviewjs

This works

table without ID date, caller-id as "Caller ID", notes
where fileClass = "Telemarketing Call" and case =  "Test Case"

however this, which I hope to be roughly equivalent, throws no errors, but pulls no results. I’m assuming it has something to do with my where filter, but I can’t see it.

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

await Promise.all(dv.pages('"Telemarketing Call"').where(p => == "Test Case").map(async p => [,
        await f(dv,p, "date"),
	await f(dv,p, "caller-id"),
	await f(dv,p, "notes")])

When you do dv.pages('"Telemarketing Call"') you limit your query to all files within the “Telemarketing Call” folder. That’s not the same as having the fileClass be like “Telemarketing Call”, unless all files in that folder also has that property set to that value.

So without testing since I don’t have a proper test file setup, and don’t use that fieldModifier thingy (which I’m assuming you’ve got the correct setup for), I think your query should look like:

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

dv.table(["date", "number", "summary"],
  await Promise.all(dv.pages()
    .where(p => p.fileClass == "Telemarketing Call" &&
    .map(async p => [
      await f(dv, p, "date"),
      await f(dv, p, "caller-id"),
      await f(dv, p, "notes")

The main changes is to match against the fileClass, loose the extra column, correct the headers, and finally to match case which seems to be a text to match against instead of the link. File links are not equal to the link with the same name.

thank you.