Creating a Query Type Definition

You start defining a custom query type by creating an XML format file defining the input fields you want to be displayed in the query form in Content Studio. You can specify the type of control to display for each field, and you can also exercise some control over the layout of the form by using container elements to group fields together and arrange them in rows.

The following example shows a simple query type definition containing three fields, two of which will appear in a single row.

<?xml version="1.0" encoding="UTF-8"?>
<query name="customQuery" xmlns="http://xmlns.escenic.com/2014/datasource-query">
  <editor>
  <component name="section" />
  <field name="itemCount" type="number" />
  <container style="row" column-ratio="3:1">
    <field name="myField1" type="lookup" source="groupNames" />
    <field name="myField2" type="enumeration" enum="groupIndex" />
  </container>
  </editor>
</query>

For a complete description of the query definition format, see datasource-query.