Creating a property using a function does not work if the function references an existing property that has a hyphen (“-”) in the property key, for example first-name
. The same function does work when you reference a key that do not have hyphens in the name.
Steps to reproduce
- Create a note and add a property with a hyphen in the key, e.g. first-name. Also add a property with no hyphen in the key, e.g. firstname. Put a value for each property.
- Create a Bases and filter so you see the note you created.
- Add the firstname and first-name properties so you can see the values
- In the Base, create a new property with the formula
firstname
, this will work as expected - In the Base, create a new property with the formula
first-name
, this field will be empty
Did you follow the troubleshooting guide? [Y/N]
Yes, and I recreated the bug in the sandbox vault. See the screenshot below.
Expected result
The new property that references a property with a hyphen in the key should show the value for that property.
Actual result
The new property is blank.
Environment
SYSTEM INFO:
Obsidian version: v1.9.4
Installer version: v1.7.7
Operating system: Windows 11 Pro 10.0.26100
Login status: logged in
Language: en
Catalyst license: insider
Insider build toggle: on
Live preview: on
Base theme: adapt to system
Community theme: none
Snippets enabled: 0
Restricted mode: on
RECOMMENDATIONS:
none