TheodoreCRM2026 1.2.tbx (87.1 KB)
Tinderbox 11.6.0, macOS 26.3, Apple M1 Pro
I may have gone way over my skis here, with the help of Claude, in my first major Tinderbox project in more than a year. I’m hoping someone can give me at least a clue about what’s going wrong here. If you want to jump into the TBX document, it’s attached.
I’m building a CRM and need an agent that flags duplicate prospects. The agent finds notes with $Prototype == "ConnectionProspect" in a container called Connections Raw, then checks whether a matching $LinkedInURL exists among notes in a container called Prospects. If a match is found, it sets $DupeTrace to the matching note’s name and $DuplicateFlagto true.
Agent query (accepted without error):
$Prototype == "ConnectionProspect"
& $Container == "Connections Raw"
Agent action (generates parse error):
$DupeTrace = collect_if(all, $Prototype == "ConnectionProspect" & $Container == "Prospects" & $LinkedInURL == $LinkedInURL(this), $Name)[0];
$DuplicateFlag = $DupeTrace != "";
The Errors and Warnings panel shows:
This agent’s $AgentAction cannot be parsed: $DupeTrace = collect_if(all, $Prototype == “ConnectionProspect” & $Container == “Prospects”…
I’ve also tried these variants, all generating the same error:
$DupeTrace = collect_if(find($Prototype == "ConnectionProspect" & $Container == "Prospects"), $LinkedInURL == $LinkedInURL(this), $Name)[0];
$DupeTrace = find($Prototype == "ConnectionProspect" & $Container == "Prospects" & $LinkedInURL == $LinkedInURL(this))[0];
var:string vURL = $LinkedInURL;
$DupeTrace = collect_if(all, $Prototype == "ConnectionProspect" & $Container == "Prospects" & $LinkedInURL == vURL, $Name)[0];
Even this single line fails:
$DuplicateFlag = $DupeTrace != "";
Both DupeTrace (string) and DuplicateFlag (boolean) exist as user attributes. Smart Quotes is off.
Interestingly, a working agent in the same document — Agent 3: Count and Date Maintenance — uses collect(children, ...)successfully. That agent’s scope is limited to children of the notes it finds, so it never needs to reference $LinkedInURL(this) across containers.
My questions:
-
Is
$AttributeName(this)valid inside acollect_ifcondition in an agent action? -
Is
collect_if(all, ...)valid in an agent action, or doesallcause problems in that context? -
What is the correct syntax for looking up a matching attribute value across a separate container from within an agent action?
Any guidance appreciated.