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.8K Product Ideas
- 1.8K Ideas Exchange
- 1.5K Connect
- 1.2K Connectors
- 300 Workbench
- 6 Cloud Amplifier
- 8 Federated
- 2.9K Transform
- 100 SQL DataFlows
- 616 Datasets
- 2.2K Magic ETL
- 3.9K Visualize
- 2.5K Charting
- 738 Beast Mode
- 57 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
- 394 Distribute
- 113 Domo Everywhere
- 275 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