Can someone help with this ‘Birthday’ issue please. It used to render the age in whole years of a person on their next birthday, along with their birthDate. Recently however, the age began rendering up to 14 decimal points – odd.
Hi,
I am new to Obsidian and I really find dataview to be very helpful. Even more so with js added to it. I am however not the strongest coder so I run into a bit of an issue.
What I want to achieve is a list of all my tasks on all pages sorted by the first tag in each task. All my tasks starts with a tag.
So I started with listing all not completed task.
Part two is a bit more tricky, I have found.
I have managed to make it a single list(without headings) but I think that it is due to either a bug or something I dont understand. And it is not sorted by the tag.
This is the code for that(dataview obviously):
TASK WHERE !completed GROUP BY file.tag
If i add an “s”(file.tags) to the last part of this query it will list all tasks in same file with Tags as heading.
Tags in task text aren’t parsed as tags. They’re just content (obsidian-tasks understands tags in the context of tasks, but dataviewdoes not and Obsidian does not). The tags you see in the latter example are the file’s tags, not the tags attached to the task. Since the tag is at the beginning of the text, what you actually want is to sort alphabetically. You can accomplish that with this:
// 1. Let's gather all relevant pages
const pages =
dv.pages('"_tmp/20210922 test for sumant28/Life"')
.filter(page => page.file.name.includes("test note"));
// 2. Now let's transform from thing per date (we have single page for each date) into thing per purchase (we want to have as many rows in a table as all purchases extracted from all pages)
const purchases = [];
pages.forEach(page => {
page.purchases.forEach(purchase => {
purchases.push({
file: page.file,
date: page.date,
store: purchase.store,
item: purchase.item,
comments: purchase.comments,
});
});
});
// 3. Let's sort it by date, newest first (note "-" before "purchase.date")
purchases.sort(purchase => -purchase.date);
// 4. And let's print a table of those purchases
dv.table(
[
"File",
"store",
"item",
],
purchases.map(purchase => [
purchase.file.link,
purchase.store,
purchase.item,
])
);
I had logged dozens of entries making the resulting table too unwieldy. I already have pages set up for each store in Obsidian which is a file link in the table using this syntax “[[store]]”. I want to display a filtered DataviewJS with purchases only from that store that goes on the bottom of every store file in my vault. I figured out how to filter the table using an extra int field called rating but I want to filter instead based on the .includes function but whenever I try to do this I get the error message saying purchases.store.includes is not a function.
So, just to clarify. Each week you go into the dataview table and fill in the var start and var end dates manually correct?
On each of my daily pages I have a link to the weekly page that it belongs in. Is there a way to use weekly link to pull the corresponding daily pages? That would make it more automated for me.
Also, is there a way to add a progress bar into a dataviewJS table? I have a book reading progress bar formatted like this
I am just exploring the possibility to send a note as a email. I am just using a simple URL scheme to generate the connection btw Obsidian and my mail app. subject is generated smoothly in the block below, and i could generate recipients (through a user prompt) easily.
The tricky bit is the email body and more specifically:
The call method for the note content (i am trying dv.io.load which works but embarks metadata & everything). Is there a slicker way to call the note’s content?
URL encode the note’s content. Is there a quick way to do so or is it a series of .replace()?
Hi, Can someone please help me do a custom sorting with a comparator (I want to sort by type then by date then by state then by file.ctime) ?
I’m new to this, so the docs didn’t help me much.
This looks great and is essentially what I have been trying to create with very little knowledge. Thank you. Would you mind showing us what your book note looks like? And what time-read and date-published mean? Also, when I used the formula, my currently-reading is on the bottom instead of the top.
Hi, I’m trying to do a similar thing with Dataview: re-formatting a date in a table.
I’d like to use a frontmatter date called created on my notes which uses the format dddd, MMMM Do YYYY, hh:mm AA, but display it in a table in the format MM.dd and sort the table ascending by these dates.
Can anyone provide any tips for a snippet for this? Thanks!
Do I need to change the date format in the code to my own (DD-MM-YYYY as set in Daily Notes) ?
I don’t seem to get it working, I get the hint between () and have named the notes with today’s date in the aforementioned format, but I get no navigation.
Unless this is already possible in DataviewJS, please find in this forum as well as in Dataview’s github a FR for embedding local media (audio, image and video) in a dataview query (table, list, etc…), possibly using relative paths inside vault for better cross-platform portability.
---
abandoned: null
release date: 1970-01-01
pageprogress: null
pagecount: null
Author: Becky Chambers
Title: A Closed and Common Orbit
Series: Wayfarers
number-in-series: 2
time-read: 2020-08-20
Mood: 😭😭🥰😭
tags: book
---
This is what my book notes look like. time-read is the date I finished the book. date-published/release date is essentially what it sounds like. There are a lot of books coming out this year that I want to read, and I don’t want them to get buried, so I thought it would be good to keep it organised.
Not quite sure why your currently reading is at the bottom. But if you have more books in that than in your unreads, that might have something to do with it.