HTML code is not working in table view
Hi Folks,
I am pretty new in DOMO and need your help.
I tried with the following code in DOMO beast mode.
CASE WHEN DATEDIFF(CURRENT_DATE(), `Last updated Date`) > 3 then concat('<div style="color:red">',`Last updated Date`, '</div>')
ELSE concat('<div style="color:green">', `Last updated Date`, '</div>')
END
but, it doesn't display anything on the table. I tried with save and close and checked in the browser but nothing.
Best Answer
-
odd. I just did a test and it worked.
My beast mode looks like this which is just a copy and paste of what you shared but changed the date field to match the covid dataset field.
CASE WHEN DATEDIFF(CURRENT_DATE(), `date`) > 3 then concat('<div style="color:red">',`date`, '</div>') ELSE concat('<div style="color:green">', `date`, '</div>') END
Do you have any other properties set? Something in the chart properties could be overriding it.
**Check out my Domo Tips & Tricks Videos
**Make sure toany users posts that helped you.
**Please mark as accepted the ones who solved your issue.1
Answers
-
The basic table card supports a limited amount of HTML in it. To do what you want to do, you need to choose the HTML table card type. This is found under Tables and Textboxes in the chart types dropdown list.
**Check out my Domo Tips & Tricks Videos
**Make sure toany users posts that helped you.
**Please mark as accepted the ones who solved your issue.1 -
Thanks MarkSnodgrass for the prompt response.
I already tried with HTML table too, but again no result.
Thanks
0 -
odd. I just did a test and it worked.
My beast mode looks like this which is just a copy and paste of what you shared but changed the date field to match the covid dataset field.
CASE WHEN DATEDIFF(CURRENT_DATE(), `date`) > 3 then concat('<div style="color:red">',`date`, '</div>') ELSE concat('<div style="color:green">', `date`, '</div>') END
Do you have any other properties set? Something in the chart properties could be overriding it.
**Check out my Domo Tips & Tricks Videos
**Make sure toany users posts that helped you.
**Please mark as accepted the ones who solved your issue.1 -
I don't see any property set on the chart, but I did apply reset on all properties and magically it's working now.
Thank you, sir.
1 -
@ankt84 that is great to hear it is working! I have had to do the reset chart properties from time to time when something isn't working as expected. If you can mark my answers as accepted, that will help others in the community.
**Check out my Domo Tips & Tricks Videos
**Make sure toany users posts that helped you.
**Please mark as accepted the ones who solved your issue.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
- 656 Datasets
- 115 SQL DataFlows
- 2.2K Magic ETL
- 813 Beast Mode
- 3.3K Visualize
- 2.5K Charting
- 81 App Studio
- 45 Variables
- 771 Automate
- 190 Apps
- 481 APIs & Domo Developer
- 77 Workflows
- 23 Code Engine
- 36 AI and Machine Learning
- 19 AI Chat
- AI Playground
- AI Projects and Models
- 17 Jupyter Workspaces
- 410 Distribute
- 120 Domo Everywhere
- 280 Scheduled Reports
- 10 Software Integrations
- 142 Manage
- 138 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