How do I use runtime in a criteria?

In Spotler CRM, a runtime criterion is a rule in a report whose value you choose each time you run the report. This way, one report can show data for different countries, teams or other values, without creating a separate report for each one. You set a runtime criterion with the Runtime checkbox in a rule in the Segmentation step of a report.

To use a runtime criterion, add a rule in the Segmentation step, select the object and field, and select the Runtime checkbox at the end of the rule. You can leave the value empty or enter a default value. When you run the report, Spotler CRM asks which value to use.

When is a runtime criterion useful?

A runtime criterion is useful when several people or teams need the same report, but each for their own selection. Instead of maintaining one report per country, team or product, you keep one report and choose the value at the moment you run it.

For example, your company has a sales team in the Netherlands and a sales team in the United Kingdom. Both teams want the same overview of their accounts. Without a runtime criterion, you need two reports: one with the rule country is equal to the Netherlands and one with country is equal to the United Kingdom. With a runtime criterion on the country field, you need only one report. The Dutch team selects the Netherlands when they run it, and the UK team selects the United Kingdom.

How do you set up a runtime criterion?

You set up a runtime criterion in a rule in the criteria builder, in the Segmentation step of a report.

  1. Open the report and go to the Segmentation step.
  2. Add a rule and select the object and field, for example Account and Country.
  3. Choose an operator, for example Equal to.
  4. Leave the value empty, or enter a default value that is filled in when you run the report.
  5. Select the Runtime checkbox at the end of the rule.
  6. Save the report.
Rule on the Account Country field with the Runtime checkbox selected

What happens when you run the report?

When you run a report with a runtime criterion, a window opens with the section Runtime Fields. This section shows every runtime criterion in the report, so you can adjust it before the report runs.

For each runtime criterion, you can:

  • check the field in Field Name, for example Account.Type
  • change the Operator
  • choose or change the Value, or keep the default value
  • select Skip to leave this criterion out of this run

Then choose the output type under Choose output type: Screen, PDF or CSV, and click Run report. The report shows only the records that match the values you chose.

Run window with the Runtime Fields section, showing the field Account.Type with the operator Is one of, the value Analyst and a Skip checkbox, above the output types Screen, PDF and CSV

How do runtime criteria work in a scheduled report?

A scheduled report runs automatically, so nobody is asked to choose a value. Spotler CRM then handles each runtime criterion as follows:

  • With a default value, the scheduled report uses that default value.
  • Without a value, the scheduled report skips the criterion.

To make sure a scheduled report always shows the right selection, enter a default value for each runtime criterion. Scheduling reports is explained in Scheduled report.

Combine runtime criteria with fixed rules

A runtime criterion is a rule like any other in the criteria builder, so you can combine it with fixed rules, groups and exclusions in the same report. How to structure criteria is explained in How do I build criteria with groups, rules and exclusions?