I am using dataview to note optimal germination temperatures for plants I grow. I use a property (opti_germ_temp) and use the number property type. Sometimes the data is a range, e.g. 60-70 fahrenheit. I don’t want to make the decision to put 65F and would like the number to show the range.
The problem is the property doesn’t reliably show the range. In source mode the data point is not even there and I can see that I lose the data on several notes! How can I use numbers in a range in properties?
Things I have tried
I have tried using the property type text, but would prefer a number property type assuming that will be more handy when using dataview.
There are no numeric types neither in Dataview nor Obsidian properties to denote ranges of numbers. I see three alternatives available for you to use with current state of tools:
You could use two properties, one for each end of the range
Use a text field, and given a known delimiter like -, you could do stuff like:
FLATTEN choice(contains(opti_germ_temp, "-"),
split(opti_germ_temp, "-"),
[opti_germ_temp, opti_germ_temp] ) as germ_range
Then you’d use germ_range[0] for the minimum value, and germ_range[1] for the maximum value. (Possibly after doing number(...) on either of them).
Use a fixed value in your property, but always allow some lenience in your queries. That is you could allow for ± 5 degrees outside of the given value, or possibly ±5 % of the given value