Skip to main content

Create a constant data source

How to create a constant data source

There are several types of constant data source. They all represent a manually entered value, which can be populated by a user when they run the report.

Constant data sources can be used as query parameters within AQS and AQS statistics data sources, so they provide a handy way for users to customise the output of a report.

For example, imagine a custom report about defects. There are various possible ways to filter and sort those defects (e.g. by area, by status, by date). By including several constant data sources that take user input, and configuring an AQS data source to use them as parameters, the user can tailor the report to their requirements.

Create a constant data source

To create a constant data source in the Report Builder:

  1. Open the Data sources tab and select Create data source.
alt text
  1. Supply a meaningful Name. Users will see this when running the report, so ensure it describes the data source clearly. To ensure the data source can't be left empty, enable Required.

  2. Select Type and choose one of the following:

TypeDescriptionExampleInput Method
Alloy IdRepresents an Item ID value5f86c84e2bdc0600696cddb7Type into the field
DateRepresents a date value11 May 2022Select a value with the calendar picker
Date TimeRepresents a date and time value2 July 2022 13:30:00Select a value with the calendar picker
GeometryRepresents geometry coordinates in GeoJSON formatDraw points, lines or polygons using the Geometry Editor
NumberRepresents a number value314Type into the field
SeasonalRepresents a seasonal value (a date without a year)25th DecemberSelect a value with the calendar picker
TextRepresents a text valueHello world!Type into the field
TimeRepresents a time value14:20:00Select a value with the calendar picker
Yes/NoRepresents a boolean valueYes or NoChoose an option
  1. We recommend setting an appropriate Default value if possible. This helps to ensure your report will always run successfully. Users can change it beforehand if they wish!

  2. If you've set Type to Alloy Id and your report is intended to be run from an item, it's possible for the data source to be automatically populated with that item's ID. To do this, select the Tags field, select the Incoming item id tag, and then select Save.

alt text
  1. Select Create to finish.

Customise sorting and headers

If you edit the data source after it's been created, there will be two more optional fields to configure:

Use as a query parameter

For information about using a constant data source as a query parameter, see: