/
Adding Colours to Grid Rows Dynamically

Adding Colours to Grid Rows Dynamically

Introduction

The colours of rows in a grid view can be dynamically set by creating an attribute called gridRowColour on the backing table and its value must evaluate to a String containing either a hexadecimal colour e.g. "#EF473B" or html named colour.

This is useful in various scenarios, such as where a company onboarding request is rejected, an invoice is overdue or an SLA has been breached. This is illustrated below 

Configuring Coloured Rows in a Grid View

  1. On the Table backing your Grid View, add an attribute called:  gridRowColour
  2. Add this attribute to your grid view
    1. This attribute will not be displayed on the grid view as it is a special attribute.
  3. When saving the data on the backing table, have the Actionflow create an attribute in a calculate node that evaluates to a colour you require.
    1. For example, set the colour to a red colour ("#FF9088") where in.Status is "Rejected": 
  4. Ensure when you use a Save Node on your actionflow that the attribute containing the colour is mapped onto the gridRowColour attribute on the backing Table. 
    1. For Example: