The OData query
OData queries are used to retrieve document data for the custom report and to create the XML model used to bind or merge retrieved data to the placeholders in the Word or Excel report templates (the Content Controls)
You cannot use Odata queries to retrieve document data directly from the WorkZone Content Server. Instead you must use the Report JSON file to contain the OData queries you want to use for the report.
The OData queries in the Report JSON file are based on standard OData queries using WorkZone specific rules of organizing OData queries and are are organized in a special tree structure in the Report JSON file.
Create OData queries
OData Queries are queries into the existing OData model that return requested data.
The OData queries can be created with a valid OData address (for example, http://db01/OData) and verified with existing data. You can use an Internet browser (for example, Microsoft Internet Explorer) and the WorkZone Query Builder tool to compose the OData queries.
You can also create the OData queries directly in the Report JSON file, but it is advisable to create and test OData queries before you create the Report JSON file in order to ensure that the OData queries return the requested document data correctly.
Eksempel: OData query
You want to create a report that retrieves specific document metadata as well as any supplementary documents.
A query is created to retrieve the document metadata, such as type, summary, ID, and title.
http://db01/OData/Records('1')?$select=RecordKey,RecordNo,Title,RecordType_Summary
If you want data about the parent case, you can use the Expand parameter for the appropriate entity and request its properties in a Select option.
http://db01/OData/Records('1')?$select= File/FileNo,File/Title&$expand=File
If you want Supplementary Documents for the document, you can modify the query as follows:
http://db01/OData/Records(‘1’)/SupplementaryDocuments?$select=RecordKey,Title