Setting Report Row Colors with a Rule
  • 17 Dec 2024
  • 1 Minute to read
  • Dark
    Light

Setting Report Row Colors with a Rule

  • Dark
    Light

Article summary

Overview

Color Rules allow the user to define complex logic using a Rule to apply different colors to a row in a Report. The Rule will evaluate the data in a row and will add color to the row when its data meets the Rule’s condition. Similarly, a Report Row can be customized with a Color Rule by using a Flow.

In the following example, a Color Rule will be created on a Report that contains Account Data. The Color Rule will evaluate if the accounts can use the platform Portal by highlighting the accounts that do meet the Color Rule criteria in green.

Example

  1. Begin in a Designer Project Folder, select the Create Report button, then select and name the default Report. Then, select Create to open it in the Report Designer.
  2. Under the Data Sources column select Add. Search for and select Account Data Source.
  3. Then, for the Data Fields, add the 'EmailAddress' and the 'CanUsePortal' fields.

  4. In the Properties panel under the Formatting section, select the plus icon in the Color Rules properties.

  5. In the resulting window, select Pick or Create Rule > Rule Information > Create New > Statement Rule.
  6. Name the Statement Rule and click Create to enter the Rule Designer. This rule will color the rows that have the 'CanUsePortal' set to False.
  7. In the Rule Designer, select SETUP INPUT DATA to add an input. Then, click 'Define Input Data'
  8. Name the input data as CanUsePortalValue with a Boolean type then click Save and exit.
  9. To build the Rule, choose Select Data Element then select CanUsePortalValue, and set the verb to Is True.
  10. Save and close the Rule to navigate back to the Add Colors Rules dialog. 
  11. Under the section Input Bindings, select Update Inputs. The input data that was used for the CanUsePortal will appear. Select the 'Pencil' icon.

  12. Select the CanUsePortal column in the Report Fielddrop-down list and choose OK.

  13. Now that the connection is made between the field on the Report and the Rule that will evaluate it, the next step is to define the row color for those that meet the Rule’s condition.
  14. Click the Background selector. In the Color Picker dialog select a color and click PICK.

  15. The other color settings can be filled if desired, but the Color Rule for this example is complete. Close the Edit Row Color Rules dialog by selecting OK.
  16. Select Run Report in the top action panel of the Report Designer. The Report will open, as pictured below the Color Rule applied to the rows that have the 'CanUsePortal' value set to false.




Was this article helpful?