BIQ
01-12-2023Cloud Apps
Blox: Replace NaN:NaN:NaN with '-'
I have a blox widget that outputs NaN:NaN:NaN. Can I apply a script to replace this with a hyphen?
- 01-16-2023
Hi BIQ ,
Hope this script works for you. Update the variables in the script as commented
widget.on('processresult', function(se, ev){ let panelName = 'Region' //update your panel name here let textToRepalce = '$10.18M' //update value of text to be replaced let replaceWith = '-' //new value/text to be displayed $.each(ev.result, function(resultIndex, resultValue){ $.each(resultValue, function(index, value){ if(value.Panel == panelName && value.Text == textToRepalce){ value.Text = replaceWith } }) }) })-Hari