Skip to main content

Pull-down menus

DPQL Reference

Pull-down menus

When creating custom stats, you can set up specific values to be dynamically replaced by the user’s selection from a pull-down menu.

The same mechanism is used in the built-in stats which have pulldowns to choose a date range, ticket property, grouping field, order, etc.

image.png

To create a pull-down menu, you need to create a variable in the stat builder for that particular stat, and then put code in two places:

First, create a variable by clicking Add Variable within the stat you want to create.

Determine the ID, this will be used to refer to the variable in the title of the stat - allowing you to create a pull down menu. It will also be referred to in the query itself.

Determine the rest of the variable criteria as necessary.

image.png

Now, add the variable ID to both the title and query.

image.png

  • Title - this is where you can select which value you want for dynamic replacement. A default value is specified here in the variable itself. The format should be ${date}.
  • The query - this is where the actual replacement is made to run the correct query. The general form again is ${date}.
Authors list

First published: 22/05/2018

Last updated: Mar 22, 2019 by Colin Dunn