don't show the applied column at all, and just use dataview instead of dataviewjs query…
- User
don't show the applied column at all, and just use dataview instead of dataviewjs query me for
dataviewjsconst currentFile = dv.current().file.path; const pages = dv.pages("#Job") .where(p => !p.Applied && p.file.path !== currentFile) .sort(p => p.DJobPostDate); dv.table(["Date Posted", "Note Title", "Applied"], pages.map(p => [ p.DJobPostDate, dv.fileLink(p.file.path), dv.el("input", "", { type: "checkbox", onchange: async (e) => { const file = app.vault.getAbstractFileByPath(p.file.path); if (!(file instanceof TFile)) return; let content = await app.vault.read(file); // Match the task "- [ ] Applied" exactly (case insensitive) const taskRegex = /^- \[ \] Applied.*$/gim; if (taskRegex.test(content)) { content = content.replace(taskRegex, (line) => line.replace("- [ ]", "- [x]") ); await app.vault.modify(file, content); } else { new Notice("No task '- [ ] Applied' found in " + file.name); } } }) ]) ); - Assistant
Certainly! Here's the modified Dataview (non-JS) query that does not show the "Applied" column and uses the
dataviewquery format rather thandataviewjs. Because your original intention was to show only Date Posted and Note Title, and presumably the interactive checkbox is not supported by pure Dataview queries, this will produce a simple table without the "Applied" column.Here is the rewritten query using just Dataview (markdown inside a code block):
dataviewTABLE DJobPostDate AS "Date Posted", file.link AS "Note Title" FROM #Job WHERE !Applied AND file.path != this.file.path SORT DJobPostDate ASC
Explanation:
TABLEtells dataview to output a table.- Select only the fields you asked for, no "Applied" column.
- Filter for pages tagged
#JobwhereAppliedis falsy and exclude the current file.