GOCDB/Selecting Fields Shown in a Web Portal Table
Back to GOCDB-4.0d1 Customisation
Modifying Fields Shown in a Table View
To add or remove a field from a table shown in the web portal, follow these three steps:
- Find out the name of the query used to get the table's data
- Find the individual query XML file corresponding to this query
- Add or remove fields from this XML file
Getting the Table's Query Name
When a table page is requested, the query name is specified in the URL as the &query= parameter. The parameter is the query name. For example in the URL:
The query name is "Get_Site_Production".
Finding the Individual XML Query File
The individual XML query file contains a list of fields that are returned by a query. These are the fields to modify. Firstly, this file needs to be located.
To find out which individual query file corresponds to a query name, the "XML Output" queries XML file (containing data for all available queries) is used. In this release of GOCDB-4, the XML Output queries file is in the following location:
Each available query is uniquely named in this file. Searching for a query name (in this case, "Get_Site_Production" in the 4.0d1 release) leads to the following XML:
<Get_Site_Production> <sql> select a.* from GOCDB_SITES inner join tobjects objects on objects.cobjectid=a.cobjectid where ( objects.cdateoff > sysdate or objects.cdateoff is null ) and objects.ctypeid=101 order by $0 </sql> <description>Get a list of Site objects</description> <output_file_format>../../config/xml_output/output_formats/Get_Site_Production.xml</output_file_format> </Get_Site_Production>