Help Center

CSL – Report Variables

CheckMarket offers a powerful scripting language to enhance your surveys and reports called the CheckMarket Scripting Language or CSL for short.

You can use it to place variables in your surveys and reports by selecting them from a drop-down.

This article lists the extra variables available in the ReportBuilder. Many of the Survey variables can also be used in the ReportBuilder, specifically the Survey, Questions and Results sections. These variables are not listed here, please refer to the Survey variables article for those.

Survey report variables

List of ReportBuilder variables

ID of the report
the report name: this is mostly for internal use, but it’s also shown in the Report Viewer if no title is specified
title for the Report Viewer
the active language of the report
the name of the global report filter
the name of the selected prebuilt filter – only available in the Report Viewer, inside elements
name of the share you’re accessing – the name refers to the filter of the share
a collection of all the elements in the report – used mostly in ‘each‘ loops
reference to the element with ID 123
reference to the current element – short for {{[current element id]}}

No matter which way you access your element, the next variables can always be used. We’ll describe them using the {{element… prefix, but you safely replace that with {{…

ID of the report element
order in which the element appears in the report
the title of the element
the short name, used in the index on the left
the comment of the element – this is the text you can add below the chart
a collection of all data sources inside this element – everything that can be found under the Data tab inside the ReportBuilder
a reference to the first data source of this element
name of this data source – either the question caption, or metadata name (respondent field or contact field)
a reference to the question of this data source – all question variables can be found in the article about the Survey variables
the name of the metadata used in this data source (respondent field or contact field)
the name of the filter used in this data source
a collection of the statistics of this element – this is what you can see below the chart if you enable Statistics in the element options
a reference to the first item of the element statistics
the text of this stat
the number of respondents for this stat
the count for this stat – for most charts this is equal to the respondent count
the average value for this stat
the NPS score for this stat
the minimum value for this stat
the maximum value for this stat
the sum for this stat
the median value for this stat
the standard deviation value for this stat
the variance for this stat


CSL offers a wide range of operators to further customize your reports. A complete list of CSL operators can be found here.

Inside reports, modal windows and tooltips can be useful. See the following article for more examples and information:
Tooltips, popovers and modal windows


You can combine all these variables and operators to create more advanced logic. Below you can find some ready-to-use CSL code snippets for different situations. Each snippet can be used immediately, or you can tailor it further to your own specific situation.

More examples can be found here:
Survey CSL snippets

This example shows how to show different text when your filtered ratings are better or worse than the global (benchmark) ratings.

  1. First go to ‘Analyze’ > ‘Reports’. Either make a new report or open an existing report.
  2. Create a ‘Column/bar’ element for a rating scale or NPS question.
  3. Go to the ‘Data’ tab, and apply a filter to this element. You can also apply a global report filter if you prefer.
  4. Also on the ‘Data’ tab, click ‘Add’ > ‘Benchmark’. Now your data is ready for the CSL.
  5. Go to the ‘Text’ tab, and add this to the comment field:
{{#if (lt}}
  The score of your department is lower than the company average.  
  Here are some tips and action points to improve your score: ...
{{else if (gt}}
  Your department is doing better than the company average. Way to go!
  The score of your department is just on the company average, that is to say that you are better than half of the departments!
  However, this also means that you score worse than the other half of the departments. Via the following action points you can be among the best in the company in the future: ...

These variables all begin with ‘…‘. Replace 123 with the actual report element ID. You can find this ID in the URL when selecting an element.

That’s it. Now a different message will be shown to the viewers, based on the results.

Leave a Reply

Your email address will not be published.