Use case or problem
I’d love for Obsidian to add the following functions for Base:
-
Support API that mark a string a tags.
Using Dataview, I can do this:
TABLE WITHOUT ID "#" + status AS "Status"
-
Support renaming the
name
property.In markdown, we can do this
[[path_to_file|display_name]]
.
In dataview, we can also rebuild the name from scratch"[[" + file.name + "|[" + publish-date.year + "] " + name + "]]" AS "Article"
. -
Support converting datetime year/month/day extraction to be integer.I use the formulayear(Publish Date)
then sort using the value descendingly, 2007 goes before 2022.My bad, this actually sorts correctly, it’s just that we somehow need three toggles to set
data-sort="ASC"
,data-sort="DESC"
, and removedata-sort
property (which causing incorrect sort, somehow).
Proposed solution
-
I suggest add a function, e.g.,
tag(...)
, that will return either<a href="#inprogress" class="tag" target="_blank" rel="noopener nofollow">#inprogress</a>
or the
multi-select-pill
class but please add something liketag-name="inprogress"
so that we can customize the tag color via CSS (do this fortags
property also (please)). -
I suggest add a function, e.g.,
link(...)
, that takes 2 arguments, (1) file path and (2) new file name. -
I suggest either return the value as integer, or support converting string to int with functionint(...)
.