Applying color rules in a column
I have designed a table cad which has string and numbers. I want to apply color rule on the cells which has numbers only.
In the added image I want to add color rules in the highlighted column but, currently as the column has both texts and numbers, DOMO does not allow me to set a condition in the color rule. I there a process to apply color rule on the highlighted column.
Is there a way where I can write a beast mode program to identify if the specific cell is having a string or a number. So if the cell has a string I leave it as it is but if it has a number I can write a HTML programm to write a conditional code to color it.
Please let me know if there is any way around.
Comments
-
I had a similar issue where we wanted to see if the a date was less than today and highlight that specific cell red. To do I created a beast mode which put in HTML:
case when `Close Date` <= CURDATE() then CONCAT( '<div style="background-color:#e45850; text-align: left; width: 100%; height:100%; margin:-20px; padding:20px"> <font color="white">', `Close Date`, '</font></div>') else `Close Date` end
When the condition is met, it uses HTML to create a div around the value and fill it in red. When it is not met it just displays the value as normal.
I did a lot of searching and testing and this is the best I could come up with. One issues I did have is the sizing of the div. The settings margin:-20px; padding:20px size the div to the default size of the datatable, however when the cell expands because of a large value the div stays the same size. So it appears more like a cell within a cell, but it was the best option I could come up with.
Jim
0
Categories
- All Categories
- 2K Product Ideas
- 2K Ideas Exchange
- 1.6K Connect
- 1.3K Connectors
- 311 Workbench
- 6 Cloud Amplifier
- 9 Federated
- 3.8K Transform
- 657 Datasets
- 115 SQL DataFlows
- 2.2K Magic ETL
- 815 Beast Mode
- 3.3K Visualize
- 2.5K Charting
- 81 App Studio
- 45 Variables
- 775 Automate
- 190 Apps
- 481 APIs & Domo Developer
- 81 Workflows
- 23 Code Engine
- 40 AI and Machine Learning
- 20 AI Chat
- 1 AI Playground
- 1 AI Projects and Models
- 18 Jupyter Workspaces
- 410 Distribute
- 120 Domo Everywhere
- 280 Scheduled Reports
- 10 Software Integrations
- 144 Manage
- 140 Governance & Security
- 8 Domo Community Gallery
- 48 Product Releases
- 12 Domo University
- 5.4K Community Forums
- 41 Getting Started
- 31 Community Member Introductions
- 114 Community Announcements
- 4.8K Archive