UI Builder - Getting contents of single score components

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-18-2023 07:27 AM
Hi,
We have a workspace with the following single score elements, these are calculated using a number of dynamic filters:
We would like to add another single score element for "Success Rate", taking the value of the Successful jobs and dividing it by the total of the other 3 values *100.
Has anyone done anything similar?
Thanks,
Tim.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-20-2023 09:24 PM
Hi @Tim D Scott
You can use the single score data visualisation or stylized text component to display the calculated value.
You need to call the Data resources ->"Aggregation query" to get the score of all 4 visualisation. Then use the client script to calculate the Success Rates. And then set the solution to the new Client State.
Now you can use the Stylized text to display the same value.
If its just a score that need to be displayed you can use this solution to display the same.
Or else you can use the single score data visualisation to display the same score card. You can select the Define data manually to enable this.
Sample JSON: Value need to be updated with Client state.
[
{
"data": [
{
"value": "40",
"change": "0",
"changePercent": "0"
}
],
"metadata": {
"eventData": {
"indicatorSysid": "fb007202d7130100b96d45a3ce6103b4"
},
"dataSourceLabel": "Number of open incidents",
"changeArrow": "steady",
"filterQuery": "",
"aggregate": {
"fieldType": "decimal"
},
"format": {
"unitFormat": "{0}",
"frequency": "daily",
"precision": 0
}
}
}
]
Let me know if it was helpful for you.
Thanks
Nootan