Different flight statuses can stand out with their own font or background color — for example, a distinct color for canceled and delayed flights, with a separate color for everything else. This guide walks through adding a script to Simpleway templates with a flight list to make that happen.
Flight statuses in Simpleway CX are referred to as "Remarks." The Remarks tab shows an overview of the available remark values, whether integrated from AODB or added as custom values by an administrator. Your remark names on the Remarks tab may differ from the ones used here, so you'll need to adjust the provided script to match your own remark names.
Topics covered:
Templates tab
Row template design mode
Element script
Sample screen:

TUTORIAL STEPS:
A) Open the Simpleway template in Designer
| |
B) Click the Elements button and select the List element. | |
C) Click the row button of the selected List element in the Format editor. | |
D) Row templates sub-window Click the three dots button and select the Edit option. | |
E) Click on the Elements button and select the Dynamic label element of the Remark (status). | |
F) Click the Edit element script button under Advanced section. | |
G) Edit script sub-window
Replace the setTextColor function by setBackground if you wish to change the background color of the text instead. You may also want to use Hex color codes of your own to fit the design of the template theme. Note: In this example, we set different colors for flight status remarks based on their content. The code retrieves the flight remark, converts it to lowercase for consistent comparison, and then applies specific colors based on the remark text: If the remark is "canceled" or "cancelled," we apply the canceledColor. If the remark is "delayed," we apply the delayedColor. For any other status, we apply the defaultColor. | |
H) Click Save again, and then exit the subdesigner using the Back button. | |
I) Row templates subwindow
| |
J) Click the Save & Publish button. Now the template is ready to be assigned and shown on your display. |