Changing Font Color
Good Morning.
Is it possible to change the font color of my table if a condition is met using a beast mode.
I have something like this
CASE
When `BI_Weight` ='5' then
CONCAT ('<div style="font-color:#A43724">', `ICR_NUMBER`, '</font>')
else `ICR_NUMBER`
end
but I only get text.
Any help would be appreciate it. Thanks
Best Answer
-
Hi @gotex
The blue text is because you make the text a hyperlink (<a href=...>). If you don't need it to be a hyperlink remove the anchor (<a> & </a>) tags from your text. If you need to have the hyperlink you'll need to add a style to the <a> tag:
<a href="#" style="color: #bbe491">
Also make sure you're using an HTML table as not all HTML tags are supported in Mega Tables.
Your second code sample changes the background color of the cell instead of the font color. If you want to change the text color only then you can replace `background-color` with `font-color`.
Going back to your original question - have you confirmed that your `BI_Weight` field is actually returning 5 or could it be a near 5 (like 5.1)?
You may want to make it a bit easier to read and use something like:
CONCAT ('<div style="font-color:', CASE When `BI_Weight` ='5' then '#A43724' When `BI_Weight` ='4' then '#F1F1F1' ELSE '' END, '">', `ICR_NUMBER`, '</div>')
**Was this post helpful? Click Agree or Like below**
**Did this solve your problem? Accept it as a solution!**1
Answers
-
I also try using this formula for another post but I only get a blue text font color.
CONCAT('<div style="background-color:#bbe491; width: 100%; height:100%; margin:-20px; padding:20px"><a href="#">', 'Green Conditional Format', '</a></div>'
0 -
Hi @gotex
The blue text is because you make the text a hyperlink (<a href=...>). If you don't need it to be a hyperlink remove the anchor (<a> & </a>) tags from your text. If you need to have the hyperlink you'll need to add a style to the <a> tag:
<a href="#" style="color: #bbe491">
Also make sure you're using an HTML table as not all HTML tags are supported in Mega Tables.
Your second code sample changes the background color of the cell instead of the font color. If you want to change the text color only then you can replace `background-color` with `font-color`.
Going back to your original question - have you confirmed that your `BI_Weight` field is actually returning 5 or could it be a near 5 (like 5.1)?
You may want to make it a bit easier to read and use something like:
CONCAT ('<div style="font-color:', CASE When `BI_Weight` ='5' then '#A43724' When `BI_Weight` ='4' then '#F1F1F1' ELSE '' END, '">', `ICR_NUMBER`, '</div>')
**Was this post helpful? Click Agree or Like below**
**Did this solve your problem? Accept it as a solution!**1 -
Thanks I was not using the HMLT table!
0
Categories
- All Categories
- 1.8K Product Ideas
- 1.8K Ideas Exchange
- 1.5K Connect
- 1.2K Connectors
- 300 Workbench
- 6 Cloud Amplifier
- 9 Federated
- 2.9K Transform
- 100 SQL DataFlows
- 618 Datasets
- 2.2K Magic ETL
- 3.9K Visualize
- 2.5K Charting
- 741 Beast Mode
- 58 App Studio
- 40 Variables
- 685 Automate
- 176 Apps
- 452 APIs & Domo Developer
- 47 Workflows
- 10 DomoAI
- 36 Predict
- 15 Jupyter Workspaces
- 21 R & Python Tiles
- 395 Distribute
- 113 Domo Everywhere
- 276 Scheduled Reports
- 6 Software Integrations
- 124 Manage
- 121 Governance & Security
- 8 Domo Community Gallery
- 38 Product Releases
- 10 Domo University
- 5.4K Community Forums
- 40 Getting Started
- 30 Community Member Introductions
- 108 Community Announcements
- 4.8K Archive