Setting Report Row Colors with a Rule
- 17 Dec 2024
- 1 Minute to read
- Print
- DarkLight
Setting Report Row Colors with a Rule
- Updated on 17 Dec 2024
- 1 Minute to read
- Print
- DarkLight
Article summary
Did you find this summary helpful?
Thank you for your feedback
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
- 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.
- Under the Data Sources column select Add. Search for and select Account Data Source.
- Then, for the Data Fields, add the 'EmailAddress' and the 'CanUsePortal' fields.
- In the Properties panel under the Formatting section, select the plus icon in the Color Rules properties.
- In the resulting window, select Pick or Create Rule > Rule Information > Create New > Statement Rule.
- 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.
- In the Rule Designer, select SETUP INPUT DATA to add an input. Then, click 'Define Input Data'
- Name the input data as CanUsePortalValue with a Boolean type then click Save and exit.
- To build the Rule, choose Select Data Element then select CanUsePortalValue, and set the verb to Is True.
- Save and close the Rule to navigate back to the Add Colors Rules dialog.
- Under the section Input Bindings, select Update Inputs. The input data that was used for the CanUsePortal will appear. Select the 'Pencil' icon.
- Select the CanUsePortal column in the Report Fielddrop-down list and choose OK.
- 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.
- Click the Background selector. In the Color Picker dialog select a color and click PICK.
- 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.
- 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?