We're reclaiming inactive PDIs to keep them available for active builders. Learn what's changing, who's affected, and how to protect your work. Read More

Dynamic Colouring on Status Reports

Cirrus
Kilo Sage

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?

 
1 REPLY 1

Tanushree Maiti
Tera Patron