Set dashboards RAG status based on average related measures RAG status

ebaileyybs
Tera Expert

Hi,

I am currently building a Dashboard application with related Measures. The Measures will each have a RAG status and the RAG status of the Dashboard will be an average of the related Measures.

For example;

Dashboard 1 has 3 related measures

Measure 1 RAG = Green

Measure 2 RAG = Green

Measure 3 RAG = Amber

Dashboard 1 RAG = Green

--------------------------------------------------------

Dashboard 2 has 5 related measures

Measure 1 RAG = Red

Measure 2 RAG = Red

Measure 3 RAG = Amber

Measure 4 RAG = Red

Measure 5 RAG = Amber

Dashboard 2 RAG = Red

The measures will be related to the dashboard via a m2m related list. I would like to have a rule in place which works out the average RAG of all related measures and populates the RAG status field on the overall dashboard.

Can anyone offer any advice on how to achieve this please?

Kind regards,

Emma

11 REPLIES 11

Hi Travis,



The name of the table is u_dashboards. I have changed this throughout the script so i don't think this is causing the issue.



Can you see that anything else may be stopping this from working?



Kind regards,


Emma


Did you try replacing your line 5 with the line in my last comment?   There were two changes:



1.   Changed the second du to dashboards to fix an error in my original script (du.u_dashboard does not make any sense, dashboards.u_dashboard retrieves the sys_id stored in the u_dashboard field of the m2m table)


2.   Changed u_dashboards to u_dashboard



If that doesn't do the trick, then you may want to add some gs.log statements in the various scripts to try and troubleshoot where it is going wrong.