Participation
ContactAgency and
Contact
These have a relationship of
Participation.psContact.psContactAgency.psAgent
Where
psContact is a reference to Contact
psContactAgency is a reference to ContactAgency and
psAgent is a reference to another Contact.
I am trying to find Participations where the Agent is a party. Ordinarily I would just map the path out, but I have had to use a number of different BO Groups and this seems to be causing AIM to get confused, so I thought why not work it out by sub query:
Find me Participations WHERE Participation.psContact.ID=ContactAgency.obContact WHERE ContactAgency.psAgent = LIRU.SavedID.
which gives me a query like this:
Code: Select all
FIND Participant WHERE Participant.psContact.ID=ContactAgency.obContact.ID WHERE EXISTS ContactAgency WHERE (ContactAgency.psPrimaryAgency.ID=LoggedInRegularUser.IDContact)
Syntax error at token "WHERE" (Column 106) - column 106 is the WHERE EXISTS
I appear to have forgotten how to write sub queries. Can someone assist?