What I’m trying to do
Hi guys, please i have an issue on Obsidian. Anyone that can help me with this?
the script i want is a Datacore table that lists all notes created in the last 7 days that have frontmatter property “noteStatus” = “new” and are in the folder “hippocampus”. In the table, I want do display the file name/link, a frontmatter property called “lifeArea” and a frontmatter property called “attention”. I want the “lifeArea” and “attention” fields to be editable.
Things I have tried
i have used only dataview and meta bind plugins for this purpose using this code below and it actually worked but now i want to do same with only datacore and meta bind:
const ONE_WEEK_MS = 1000 * 60 * 60 * 24 * 7;
const now = new Date();
// Render a Meta Bind input as inline string
function metabindText(field, path) {
return "`INPUT[text:" + path + "#" + field + "]`";
}
dv.table(
["Note", "Life Area", "Attention"],
dv.pages('"hippocampus"')
.where(p =>
p.noteStatus === "new" &&
(now - p.file.ctime.toJSDate()) < ONE_WEEK_MS
)
.sort(p => p.file.ctime, 'desc')
.map(p => [
p.file.link,
metabindText("lifeArea", p.file.path),
metabindText("attention", p.file.path)
])
);
it worked with dataview and meta bind plugins but i want it to work with only datacore and meta bind plugins not using dataview, i will appreciate any help