Tinderbox Forum

Feed an agent a list to search against from the results of another agent

Here is an interesting question. I have an agent that is pulling a list of companies. I would now like to use this list result to feed into another agent that would pull all the products related to that list of companies. Note: each product has the related company name in the $Organziation attribute. What is not clear to me is how one builds an agent query like this. I would prefer to not have to manually build the query over and over again using a bund of &s and |s.

$Prototype=="pProduct" & inside("Company Overview")

this is not an uncommon case and efficient use of agents. Rather than make agents A and B both test the whole document for notes matching their query, if all matches to B are a subset of A, inside() is your friend.

This would work if all products were inside a directory called “Company” overview, they are not. What I want is for the first agent to get a list of names, and then the second agent to iterate against that list and go find all product notes that contain one of the names from the original list.

NOTE: I have found another way to do this with action code and passing $IsReview status from the org ot the products and down to the privacy plans, which works just fine.

Actually, no. The query finds notes inside the container “Company Overview” be it an agent or note type container.

I see you’ve fixed the causal problem—good!—but for later readers your answer is inaccurate in relation to my answer. That’s not to be rude ,as possibly you mis-stated the initial context—I’m guilty of the same. As noted, your issue is fixed, but if you feel my answer is incorrect please post a reference TBX doc (happy to be wrong!).