I have inconsistent YAML properties. I have one capitalised “Priority” text property and another “priority” text property. Some notes have both, some have one or the other. (I know its bad but is due to different systems from importing from notion and general entropy)
In bases the formulas seems to be case sensitive. I have a formula that converts the text to a value that I can then sort from:
Are the values of a priority key inconsistent across your vault (some are lowercases and other uppercases or are the keys the issue (priority vs. Priority) ?
If by that you mean that you changed the name of a Priority key displayed within a base into priority, it only changes how the name of that key is actually displayed in the base, nothing more .
I mean, it doesn’t update/rename in any way a key/property in your notes…
To rename a key, you might want to look at the at the All properties pane normally available in the right sidebar once the Properties view core plugin is enabled (in Obsidian’s Core plugins)
From what I’ve tested in the Sandbox vault, if you have both Priority and priority keys, you can also use the All properties pane to merge the keys but it could require multiple renaming as apparently, the All properties pane doesn’t display both Priority and priority but only one of the 2 …
In my very quick test, the key in the All properties was priority (regrouping both priority and Priority)… which I couldn’t rename in priority (renaming it into Priority could work though, I think )
So I first had to rename priority into something else (e.g.: -priority) to make the Priority key appear, then rename Priority into priority and then again rename -priority into priority.
If this is what you’re trying to do (“merging” a Priority key with priority), I would strongly advise you to make a copy of your vault, in its current state, before doing anything else, just in case something goes awfully wrong …
You could also test on a sample of your problematic notes in the Sandbox vault, to see how it could work in your current vault … especially when it comes to the impact the merging could have on the value of the key(s) .
you can see I have priority property twice. It is because I used to do it manually through data view (where I used “Priority”), I now use TaskNotes plugin that uses “priority”. my goal now is to merge everything into the lower case priority. I should have just adjusted the field mapping on task notes, but its too late now as too many notes are like this, I just have to commit.
I think the quickest way at this point is to write a script to batch process it. I wish there was a property wrangler function like tag wrangler plugin where you could merge properties.
I have used gemini CLI to do some batch processing but honestly a script will probably be faster at this point. but IDK
This should be feasible from the All properties pane (like I said earlier)
At least, from my very quick tests it seemed to work…
I just can’t guarantee that you won’t still have some values to correct later on:
If, for example, in some notes, you only have the Priority key with Lowest as its corresponding value, after renaming/deduplicating the “priority” keys, in such notes, as there was only the Priority key, its value will still be Lowest…
The only reason I wanted to use a script is that it effects the property vault wide, so now some of my dataviews are broken, but it’s an easy fix to change capitalisation on those dataviews.
the only other thing is that it merges the capitalised Priority value to the new merged lower case priority value, which is kind of annoying, but its done now lol.