rahuldhomane
02-15-2022ETL
+ sign for values in Blox
Hi,
I was looking for a way to add '+' sign to a value whenever the result is positive in Blox. Please let me know if there is a way to add this feature
Thanks in Advance!
Please try this script. Here update the variable panelName with name of panel where you need to apply this feature:
widget.on('processresult', function(se, ev){ panelName = 'Revenue' panelIndex = ev.rawResult.metadata.findIndex(el=>el.PanelName == panelName) if(panelIndex >= 0) { $.each(ev.result, function(index, value){ if(value[panelIndex].Value > 0) value[panelIndex].Text = '+' + value[panelIndex].Text }) } })
-Hari