Why are these list items counted as "properties"?

What I’m trying to do

I’m trying to figure out how to use properties in Obsidian 1.4.1.
The release notes say these are YAML values, by which I assume there is no inline dataview-type field suport.
So to test, I created a document that has two properties, “property1” and “property2”.
I expect that property1 will be ignored as it’s “inline.”

---
aliases: []
tags: []
property2: value
---
# Testing properties

## Document information
- Last modified: `= this.file.mtime`
- created:: `=this.file.ctime`

## Testing properties
-  property1: 
	- value

Should “property1” inline field be reported as a property?

For this file, the ‘property1’ list item below is being reported as a property by the “Show all properties” pane, but not reported in the File properties pane. Also the “Show all properties” pane says there is only one file with this property, but the search for the “property1” property lists two files.


File Properties pane does not show “property1”

I don’t have 1.4.1, but inline properties need double colons, so:

## Testing properties
-  property1: 
	- value

… is probably not an inline property unless 1.4.1 has changed the syntax used (and as far as I have read, the new Properties feature only works on the YAML header, not on inline double-colon elements).

From the screenshots, I assume the reference to property1 in the All Properties list is coming from the file called 2023-07-23.

Might be wrong, of course.

1 Like

From the screenshots, I assume the reference to property1 in the All Properties list is coming from the file called 2023-07-23 .

Sorry for the confusion, and a terrible diagram. Your assumption is wrong.
In the diagram, there are three panes. Left, a search for ‘property1:’, the middle, the contents of my “Testing properties” document, and right, the “Properties” widget pane.
The Properties pane appears to report that only one document in my vault contains property1.
Clicking on the property1 in that pane automatically created the search shown in the left pane, which is for the literal ‘property1:’.
This search finds two documents, ‘2021-07-23’ and “Testing properties.” In truth, only ‘2021-07-23’ actually has the property I am trying to search for in the frontmatter. The file shown, “Testing properties”, contains the text “property1:” but this is not a valid property as it’s not in the YAML. I think.
I think this might be a bug in the “Properties” pane, as it is what creates this search in the first place. It is reporting the matching documents correctly, but messing up the search.
?

1 Like

search terms without preceding key like section: summary (as per your screenshot) will basically search all content text regardless whether it is properties, yaml, headings, tags and so on.

so the search rightfully shows 2 results because your content has it “Testing properties.md”. the Properties pane rightfully shows 1 result because it limits the “search” to those inside frontmatter.

this is as much as i know about because i was trying to amend dataview inline-fields (which searching for updated: will also return results from updated::)

btw eightning assumed that there’s property1 inside “2021-07-23.md”. that should be correct right?

2 Likes

(Core) Properties are just the ones defined in the frontmatter. Dataview can handle inline properties, formatted with double colon like efemkay say, but those are not (currently) supported in core obsidian. Maybe eventually a dataview update can add those to the Properties pane.

3 Likes

I’m using “properties” in the Obsidian sense, which as you point out are only in the frontmatter. The Dataview plugin is not relevant to this discussion.

Yes, as I said, ‘2021-07-23’ actually has the property I am trying to search for in the frontmatter. Sorry for the confusion. Let’s leave dataview out of this. It’s not related.

The search pane is conducting a plain text search, it will show you any documents that contain the string “property1:” anywhere on your note. It’s a known limitation and the reason you get two results. Because you have property1 on the daily note, you get the counter on the property pane as one

4 Likes

OK, so I am gathering that there is no such thing as a “propery” search, correct? You can search for tags, why not Properties? Maybe this is a feature request whose time is now.

Not right now, no.

1 Like

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