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 to any 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 to any 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 to any 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 to any users posts that helped you.
**Please mark as accepted the ones who solved your issue.0
Categories
- All Categories
- 1.7K Product Ideas
- 1.7K Ideas Exchange
- 1.5K Connect
- 1.2K Connectors
- 294 Workbench
- 6 Cloud Amplifier
- 8 Federated
- 2.8K Transform
- 97 SQL DataFlows
- 607 Datasets
- 2.1K Magic ETL
- 3.8K Visualize
- 2.4K Charting
- 707 Beast Mode
- 49 App Studio
- 39 Variables
- 667 Automate
- 170 Apps
- 446 APIs & Domo Developer
- 44 Workflows
- 7 DomoAI
- 33 Predict
- 13 Jupyter Workspaces
- 20 R & Python Tiles
- 391 Distribute
- 111 Domo Everywhere
- 274 Scheduled Reports
- 6 Software Integrations
- 115 Manage
- 112 Governance & Security
- Domo Community Gallery
- 31 Product Releases
- 9 Domo University
- 5.3K Community Forums
- 40 Getting Started
- 30 Community Member Introductions
- 103 Community Announcements
- 4.8K Archive