change field colors of risk assessment in project workspace
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
8 hours ago
function onLoad() { //Type appropriate comment here, and begin script below setRiskScoreColor(); } function setRiskScoreColor() { // Change field name if needed var scoreValue = g_form.getValue('summary_inherent_risk_score'); if (!scoreValue) return; scoreValue = scoreValue.toLowerCase(); backgroundColor = "#dc2626"; //HIGH -> RED if (scoreValue.includes("high")) { backgroundColor = '#dc2626'; } // MODERATE -> GREEN else if (scoreValue.includes('moderate')) { backgroundColor = '#16a34a'; } // LOW -> WHITE else if (scoreValue.includes('low')) { backgroundColor = '#ffffff'; } // EXACT SAME STYLE APPLICATION AS YOUR RISK RANK SCRIPT var test = g_form.getControl('summary_inherent_risk_score'); test.style.backgroundColor = color; // g_form.getControl('owner').setStyle('color:#151920'); } my query is that i want to field my inherent and residual colors after they getting filled with their risk scores in prject workspace on basis of this workspace but that script is not working so give me suggestion
0 REPLIES 0
