Format a Cell Background Color based on Data
In the screen designer, you can conditionally format the background color of a table cell by following these steps. This example covers the scenario when you have a Data Model that defines a color code - typically something like a record status.
Instructions
- Navigate to the Screen Designer
- Locate the Table Screen that you wish to modify (open or create a new one)
- within the canvas area - select the column that you wish to have formatted with a color
- Our example below is an “Inventory Status” table - however, you can also use similar logic to apply these colors to the reference models - for example in the Inventory Table, you can display the color of its related status.
- After you have selected the column - navigate to the options panel on the right

- In the Data Path field - if you want ONLY the color, replace the path with double ““ marks
- If you want the color code (#ccccc) displayed, then leave the data path attached to the color field on the model
- Move to the “display” options to set the property for the background formatting
- In this example, the code example is {"background": data.color}
- you can replace ‘data.color’ with a path not on the model, but could be a referenced model as well - as described, if you wanted to add color to the background of the ‘status’ column on the ‘inventory’ model for example.
- Scroll down until you see the ‘additional fields’ option in the options panel - in the “general” section

- Add the reference column here - so they system will query the field (since it was removed from the data path in this example)
End Result (with data.path = ““):
End Result (with data.path = color):
Adding {“background”:data.color} to another column in the table:
Example of a “Related” Data model - in this example we format the background of the ‘status’ column on the inventory table - which references back to the data.color object on the inventory status table shown above:
Formatting the “background”:
Add the additional query field:
Related Articles
Color Input - JSON Editing
Creating a screen, sometimes it is quick and easy to use the modal feature within a table or form design to engage with your end users to create or update a record in Fuuz. You can certainly use the screen designer to drop in the input components you ...
Transform Data in a Column
In the screen designer, you can dynamically transform data in columns. This can help when the data stored in the table, does not match the format you’re hoping to present to the user. In this example, we will highlight how we manage to convert a ...
Display
Screen Elements in this category help create a variety of elements and information to display on your screen.
Interaction
Screen Elements in the Interaction category provide quick components that allow the user to interact with the screen.
Image
The Image screen element works best when pointed directly to an Image record in the database. In other words, if your data model has a reference column to the Image system table, then you can select that reference column in the “Data Model Field” ...