The Queryfield is used to identify the column on which the search has to be done. It has to be a field that comes under the groupbyname specified for the queryfield. If "workflow" is selected in the Query Builder, then the search query will be "SWE.Name = 'Default'".
To add new Query fields
1. In the ReportXML.xml file, the query fields are found towards the end. Append the new queryfield here. Add the <queryfields> tag with the name of the queryfields in the 'name' attribute.
2. Specify the name of the field to be queried in the output fields using the 'name' attribute of the <queryfield> element. Specify the groupby name to which the queryfield belongs in the 'groupbyname' attribute.
3. Add the operators for the query in the 'operatornames' attribute of the <operators> element.
4. Add the fields under the <fields> tag. The search will be performed on these fields.
5. Specify the individual field name in the 'name' attribute of the <field> tag. Specify the value of the field in the 'value' attribute.
6. Add the <value> tag with appropriate values in the 'type', 'displaytype' and 'fromdb' attributes. These determine how the values of the field will be displayed to the user. If the 'fromdb' attribute is "false" then the values for the field are not taken from the database.
7. Add the <row> element if the value type is "rows" and display type is "dropdown". Add as many <row> elements as there are options in the dropdown.
8. Specify the display format of the date in the 'displaystring' attribute of the <value> tag if the display type is "datetime".
9. Add the <query> tag and build the query using the <add> tag.
10. Define the query for each database type using the <datasource> tag.
11. Close the </datasource>, </query>, </value>, </field>, </fields> and </queryfields> tags.
The new queryfield is now added to the list of query fields available.