Skip to main content

AQS data source

Item data returned by an AQS query

An AQS data source represents the results of an AQS query that fetches attribute data from items of a particular design/interface.

It can be thought of as a standard table, with each row being an item fetched by the query, and the selected attributes as column headers.

info

Consider testing potential AQS queries in the Data Explorer first, so you can preview the returned item results.

Create an AQS data source

To create an AQS data source in the Report Builder:

  1. Open the Data sources tab and select Create data source.

    alt text
  2. Supply a distinct Name. Users see this when running the report, so make sure it describes the data source clearly. To ensure the data source is always populated when running the report, enable Required.

  3. Select Type and choose AQS.

  4. Fill in the remaining fields:

    • Design or interface - choose the design/interface that the data source will query.

    • Attributes - use the Pathfinder to select the attributes on the chosen design/interface that you want to fetch data for.

    • Default AQS query - consider setting an appropriate default query if possible. This safeguards your report against possible failure. Users can still change the value when running the report. Select this field to open the AQS Builder.

    • Tags - if your report is intended to be run from a workflow, the data source can be populated automatically with that same AQS query that triggered the workflow. Select this field and set the Incoming AQS query tag.

      Details
      alt text
  5. Select Create to finish.

    alt text

Customise sorting and headers

To configure these optional fields, edit the data source after creating it:

Use another data source as a query parameter

It's possible to use another data source in the report as a parameter when setting the Default AQS query.

For example, you want an AQS data source that fetches all items of the Bollards design with an Installed Date later than a user-supplied value.

To do this:

  1. Create a constant data source and set the Type appropriately, e.g. Date time.

  2. When creating your AQS data source, select Default AQS query to show the AQS Builder.

  3. In the purple Parameters box, select .

    alt text
  4. Select Data source headers, select beside your constant data source, then select the Value header.

    alt text
  5. Set the Display name and Default value as needed. Select Save.

    alt text
  6. Use the parameter when building your query.

    alt text