URL Aware Text-Based Filters on Reports via REST API
  • 29 Jul 2021
  • 1 Minute to read
  • Dark
    Light
  This documentation version is deprecated, please click here for the latest version.

URL Aware Text-Based Filters on Reports via REST API

  • Dark
    Light

Article summary

Overview

This article demonstrates how to implement text-based filters on Reports as a URL parameter for a service API call. The URL generated on the Integration Details page of the Report has "contains.value=" at the end, which can be used to filter the Report by providing a filterable parameter after the = symbol. This example uses a Report populated with Account data from the Decisions environment.

Example:

  1. In the Designer Folder, select CREATE REPORT > Create Report from the Folder Actions Panel.
  2. Then, name Report and select Create to proceed to the Report Designer.2019-05-30_133442.PNG
  3. In the Report Designer in the Data Sources column expand Common and add Account Data Source.

  4. In this example, add Account Id, Email Address, and Account Typefor the Data Fields.

  5. Next, add Email Address Contains Filter from Data Filters > Field Filters > Email Address.
  6. With this Filter selected, navigate to its Properties. Then, we chose the Runtime Editable option from Runtime Behavior dropdown. Select the checkbox labeled Show all data when filter value empty.
  7. This completes the Report. Save and close Report Designer.

  8. Back in the Designer Folder, select the Report. Then, from Action menu, select Run [Advanced] > Integration > View Integration Details.

  9. On the Integration Details Page Setup the Report to Run As: Service.
  10. Then, select Generate UI Code for testing in the further steps in this tutorial.

  11. Paste the generated URL into the browser and select Enter on the keyboard.
  12. The service call returns us an XML file with report data. All Portal Accounts should be viewed because a value has yet to be provided for the Filter parameter in the URL.

  13. Use the URL again but this time provide the Filter parameter with “user” as the value. Service call returns an XML file with the filtered data.


Was this article helpful?