At the moment you can link a query output to another panel to give that panel a BO context
This works OK as long as you have only two queries, eg a list of companies which if you select a company instance might show a list of employees at that company.
You can also run queries that prompt the user for a value and then show the results.
Code: Select all
FIND Company WHERE Company.Name=?Name
I'd like to be able to extend that runtime prompt to link a query to another query's selected record
Code: Select all
FIND Employee WHERE Employee.Company=SELECTED(Companies)
Where SELECTED() captured the selected record of the query Companies. This is not the same as a sub query at the moment because a sub query is an encapsulated query within a query whereas this is two distinct queries that I need to display their results side by side, one driving the other, that would easily be extendable to further chains
Eg Companies -> Employees -> Telephone Numbers
CompanyQuery
EmployeeQuery
Code: Select all
FIND Employee WHERE Employee.Company=SELECTED(CompanyQuery)
TelNoQuery
Code: Select all
FIND TelNo WHERE TelNo.Employee=SELECTED(EmployeeQuery)
You can get round this limitation using the LIRU or the Session variable, however this generates an SQL query EVERY time the LIRU is called and the query selects everything in that BO hierarchy. This seems wasteful if the LIRU is searching all the way down a Company BO structure while you are working on an unrelated BO eg Orders. (I am assuming the session variable BO works in the same way as the LIRU I haven't tried it yet but I can't really think of a way that it would work otherwise). I have 4 core BOs that support quite complex parent child relationships so putting these objects onto the LIRU generates a lot of SQL activity when the results are not needed.
If you were able to generate linked queries similar to that described above, you'd be able to design VP with multiple related parent child queries without having to engage highly complex refresh processes eg multiple different queries hanging off the selected Company BO.
While I write this I am questioning how it might capture the use of the same query on two different tabs... but that is solutioning not suggesting.