Sometimes the simple questions confound me. My question: how do you test whether a note exists or not ?
As a background I have a set of tasks in a container called “/Tasks” with I would like to move automatically with an agent from “/Tasks” to “/Projects/ProjectName” where ProjectName refers to the various on-going projects e.g. “Project 1”, “Project 2” etc… Each task has an attribute called $ProjectName so that the path to the project can be build using:
$path= “/Projects/”+$ProjectName
and the move is done by
container($path)
However I only want to do the move if the actual $path exists and refers to an existing note or container. I’m stuck on this.
You can use just about any attribute that will have a value for any note that exists. But $Path is probably the most logical choice, in case you return to this document after a time and are trying to remember what the action is doing.