I'm using a field class that will filter a lookup list of companies to only show those that provide a certain service.
The 4 tables used are: PURCHVIEW,PCSRVCS,SRVCFETCH and COMPANIES and the method I'm using is:
void setRelationship(java.lang.String objectName, java.lang.String whereClause)
so I'm restricted to just one object to link to and I've chosen COMPANIES since I want the company information from that table to be displayed in the lookup.
PURCHVIEW has a 'contractnum' attribute which is also included in PCSRVCS
PCSRVCS has the 'contractnum' and 'servicesid'
And finally SRVCFETCH has 2 attributes: 'servicesid' and 'company'
I'm quite lost with how to create the connection after doing:
"contractnum = (select contractnum FROM PCSRVCS where contractnum = :contractnum"
To summarize: Given the contractnum in PURCHVIEW, I need to check it with the contractnum in PCSRVCES --> Check the servicesid in PCSRVCES with that in SRVCFETCH --> Match the companies that have that serviceid in SRVCFETCH with the information in the COMPANIES table.