Color Texts in the Record List
Overview
This article introduces how to add colors to texts of fields within the Record List page. Colors are assigned to the texts based on values within the records.
Prepare the App
Create an App named "To do" with the following fields.
Field Type | Field Name | Field Code | Options |
---|---|---|---|
Text | To Do | todo | -- |
Date | Due Date | duedate | -- |
User selection | Assigned To | assignedto | -- |
Drop-down | Status | status | Set the following options:
|
Add a few records into the App. Make sure to include some records with the Status set as "Not Started".
Sample Code
Type the following code into a text editor and save it as a JavaScript file. Upload it to the App's JavaScript and CSS Customization settings .
|
|
After saving the settings and clicking on Update App, navigate to the Record list page. Records that contain Status with "Not started" will have their To do value colored in Red.
Make modifications
The code in this sample is only referencing values in the To Do field and the Status field. This code can be further customized by accessing vaulues in the Due Date field. Fields can then be colored in based on when the Due Date is compared to the user's local date.