I record my daily bodyweight in a custom data field in a DEVONthink document.
I have an iOS Shortcut that asks me for that weight, and then creates a note in DTTG with the name “Bodyweight xxx.x”
I want a Smart Rule in DEVONthink that takes that incoming document (after synchronization on my MacBook Pro ), and uses regex to extract that bodyweight number to enter into the custom data field.
I enter my weight once in a shortcut and from there it gets entered into the Apple Health app and it makes a text block I can paste into a markdown journal.
The journal tracks all sorts of things and I can flip back and see what I was watching, attending, reading, listening to, my weight, and some other personal metadata on top of my daily thoughts for any given day.
The Health app can show me trends and patterns if I want to look it at, which I do on occasion. I don’t obsess about the actual numbers just the variations and how that tracks with my mood and over all mental health (and added recently, blood pressure, ‘cause time don’t stop for no one, no how).
I guess you’re missing nothing. But the content of \1 is a string, and your bodyweight custom metadata field is a number. My hunch is that your rule works if you use a metadata field that’s defined as a string.
Or follow @meowky and use a script to set the metadata field.
Or improve on that script and add the data directly to a sheet in DT – seems the reasonable approach if you want to document the development.