Nevermind: found the answer here: Dataview plugin snippet showcase - #158 by jyrodgers
I want to do this (extract data from a field for use in the query) as well.
Context: I want to make a query that shows people I haven’t contacted in a defined amount of time. The people have a field ‘desired contact frequency’ and in it is ‘2 weeks’ or ‘2 months’, whatever. The query:
TABLE
context, file.mday AS "Last Contact"
FROM "3 - Resources/People"
WHERE desired-contact-frequency AND file.cday <= date(now) - dur(1 week)
SORT file.mday ASC
^ Works
\/ Doesn’t work:
TABLE
context, file.mday AS "Last Contact"
FROM "3 - Resources/People"
WHERE desired-contact-frequency AND file.cday <= date(now) - dur(desired-contact-frequency)
SORT file.mday ASC
There’s probably a way to do this in the js version, but 1) I’m not capable of that and 2) it seems like if there’s a way to access “desired-contact-frequency” this is a much simpler format.