I’m using a watched finder folder as an inbox for a book list.
- Create the books entry in a separate org file with key details in the text. E.g.
:Author: Bloggs, Fred
Link the finder folder (Books) to a tinderbox container /Inbox, using the Imported from Finder prototype. The only addition to the prototype is a checkbox $Converted, set by default to false.
Run an agent on Inbox:
Query (formatted for ease of reading here):
(inside("/INBOX") & !$Converted) & ($Text.contains(" :Authors: (.+)\n :StartDate: (.+)\n :ReadDate: (.+)\n :BookType: (.+)\n :Status: (.+)\n :Rating: (.+)\n :Tags: (.+)\n :Location: (.+)\n :Possessed: (.+)$") )
$Authors=$1; [... similarly for StartDate to Status$2-$6] $MySet=$7; [...ditto for the rest of the attributes] $Converted=true; $Tags=$MySet
This works fine, with one exception. What works is that new documents in the finder folder are picked up by the agent, which reads the contents into the right attributes and sets $Converted so that the agent ignores it in future.
What doesn’t work is getting the tags into $Tags. They are written into $MySet and stay there ($MySet=$7), but the conversion to $Tags doesn’t persist. For about 30 seconds or so after the conversation agent runs, $Tags is populated correctly with the content of $MyTags, but then it is wiped clean. $MySet does not lose data in this way.
I only have one agent running (the conversion one) and it has no rules or edicts. /Inbox has no Actions/Rules/Edicts. In fact the files has no Rules or Edicts at all. I can’t see anything in the agent or /Inbox which would do this.
So I just don’t understand why $Tags is being reset this way. The only thing I can think of is that it’s being reset when the Watch finder folder process runs periodically.
What am I doing wrong, please?