Bases: Additional APIs support

Use case or problem

I’d love for Obsidian to add the following functions for Base:

  1. Support API that mark a string a tags.

    Using Dataview, I can do this:

    TABLE WITHOUT ID
        "#" + status AS "Status"
    
  2. 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".

  3. Support converting datetime year/month/day extraction to be integer.

    I use the formula year(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 remove data-sort property (which causing incorrect sort, somehow).

Proposed solution

  1. 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 like tag-name="inprogress" so that we can customize the tag color via CSS (do this for tags property also (please)).

  2. I suggest add a function, e.g., link(...), that takes 2 arguments, (1) file path and (2) new file name.

  3. I suggest either return the value as integer, or support converting string to int with function int(...).

1 Like