Setting Report Row Colors with a Rule
  • 29 Sep 2021
  • 2 Minutes 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 in order 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. Go to Common 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 COLORS AND ICONS section, select ADD NEW in the Color and Icon Rules properties.

  5. In the resulting window, click PICK RULE under RULE INFORMATION and then 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 and Icon 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 the 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?