Multilevel frontmatter field

Hi everyone. I’m creating in Obsidian a “Card” for each Blessed and Saint.
In the Frontmatter, there are some fields that I will later extract using DataviewJs.
Unfortunately, I’m having difficulties with a multilayer field structured like this:


memory:
xx-xday:x1
xx-xmonth:x12
xx-xtype:x"Optional"

(I indicated EVERY empty space with an x to show the exact indentation.)

Unfortunately, Obsidian shows an orange triangle with an exclamation mark saying:
“Incorrect type. List expected.”

However, if I change the property type of the field to “List”, Obsidian shows [object Object] in the field instead of the values I entered.

I have tried many variations of what I posted, but all of them either return the same error or, worse, a Frontmatter structure error in red.

How can I get the correct format?

Please indicate with “x” every empty space before and after any data written.

Thank you.

You have the correct format above. It doesn’t display nicely in Obsidian because the Properties widget doesn’t support displaying it, is all.

Dataview, DataviewJS, Bases, and tools that read standard YAML can read it.

You’re seeing an orange triangle on the right because your YAML object doesn’t match the type you clicked. You should be able to get rid of the warning-triangle by doing this:

  • Enable Settings > Core plugins > Properties view.
  • Open the command palette with Cmd/Ctrl + P and select Properties view: Show all properties.
  • In the all-properties panel, right-click the property and select Property type > Automatic.


Unsolicited info about things you might want to adopt early on:

  • It may become easier to query a standardized two-digit day and month, so “01” instead of “1”, but both are possible.
  • Quotation marks around “Optional” are unnecessary, but they do no harm.
1 Like

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.