Re: Creating a drill down, one parent showing only its children
I don't think you need to do anything that complicated, if I understand your objective.
Basically you have a DATA page showing say 10 records. For a given record, you want to have a hyperlink (image or text does not matter) that will fly to another page to show some more information related to that parent record.
If your parent record carries multiple children records in the child table, then you need to use a 'Details' page. If your parent record always carry just 1 child record (or a query joining multiple tables but returning a single row of detailed data) then you need to use a MORE page.
Both Details and More pages can be within the same group as your DATA page or to another group. But it is easier within the same group because the Hyperlink and Parameters passed along will be automatically set for you by dbQwikSite.
If your DATA page (showing parent records) has the ID to the details page in column 'ParentID' and your details record column called 'GClas_id' used as a filtering column, then you would just need to do this type of mapping:
1. On the DETAILS or MORE page showing the child(ren) record(s), open the page settings dialog for it, you can define parameters like this (make sure the column names are the right ones):
2. On the Data Page Item set as a Hyperlink, properties dialog, you would define the parameters like this:
If you use a Details or More page within the same group as your Data page, the Hyperlink page item will be added automatically for you in the data page. If you define the Hyperlink item yourself because the Details or More page is inside another group, just set the parameters on both ends as shown in the above example. That should work.
No need for custom code.
However you do mention a special requirement in that if no parameter is provided you want to show only child records that have NULL values. This indeed may require custom code.
If you go the 'custom code way', then you can receive the parameter you have defined via the REQUEST object in ASP or $_GET in PHP.
In your case the custom code could look like this (ASP style):
If Request("v_Clas_id") > "" then
SQL = SQL & " WHERE geocategory.GClas_id = '" & Request("v_Clas_id") & "' & vbCrLf
SQL = SQL & " WHERE geocategory.GClas_id IS NULL " & vbCrLf
If this is not answering your question, please give us more details and we'll see what can be done.