Dynamic Colouring on Status Reports
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
4 hours ago
Hi,
Wondering if anyone has found a solution to this please.
We use Project Workspace as part the Strategic Portfolio Management module. When creating a status report, Servicenow applies a JSON sn_doc_page_template. In the Current Status section, the cell block is set to "background":null. I have been trying to make this dynamic based on the Status value entered (Green/Amber/Red) but any attempt at conditional scripting, or updating the StatusReportDynamicTemplateDataProvider script include results in ServiceNow’s UI Framework layout engine (which uses Prosemirror/TipTap under the hood for next-gen tables) ignoring variables inside the "background" attribute block.
If I update the choice labels to 🟩 Green etc these render on the status report but 'export as pdf' just renders it as black on white text, but at least solves half the problem.
If I use "background": "#00FF00", this is honoured in both the status report and the export as pdf, but it is not dynamic. This gives me some hope that there may be a dynamic solution out there somewhere, but I cannot find it.
Has anyone else had any luck?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
2 hours ago
Hi @Cirrus
Check these links if helps:
KB2974016 Issue with the project status report in the project workspace
KB1890794 Project Workspace Docs Template does not populate dynamic content values in the preview.
Project Workspace status report - add custom field to the "Status History" dynamic content
Regards
Tanushree Maiti
ServiceNow Technical Architect
LinkedIn: https://www.linkedin.com/in/tanushreemaiti