Every note stores the local system time of creation in the attribute Created. It also stores the last modification of title or text in Modified. Both are Date-type attributes.
An agent query of:
$Created > date("today- week")
should find all notes created within the last week. See some considerations when doing date arithmetic.
Don’t want to hardcode the test duration in the query. There’s a way for that too.
Make a new agent and add the built-inDate-type sandbox attribute MyDate as a Displayed Attribute for the agent. Set MYDate to the date after which you want to check. Now the query is:
$Created > $MyDate(agent)
The ‘agent’ part is a designator, which tells the query to test each note’s date value for Created against the agent’s date in its MyDate attribute.
I see. IOW: create a separate agent that would query notes with $Created values to identify newly created or imported notes. Correct?
Another remedial question: Is there any way to create such an agent as child of a parent agent? I’m just trying to see if there’s way to use this to quickly sort wheat from chaff, and it seems like this would provide a solution – if it’s viable – both functionally and within the outline structure we’re using.
Yes. If you want the queery permanently there, use a discrete agent for the role.
No, but only because agents can never be nested. Agents only ever hold the aliases of things matching their query. An agent can nest inside a container, but not another agent.