Hello - I have this script that I have used in the past. Now when I try to use it it is throwing an error ( cannot find function includes ). I also tried ‘indexOf’. Does anyone know why this will not work now? All this is trying to do is look at a field set to float and if it has a negative sign in front, replace with ().
results.each(function(index) {
var field, result = “”, newField;
field = record.tables["detail"][index].fields["Reduction"];
if (field !== "" && field.includes("-")) {
result += "(" + "$" + field.replace("-", "").trim() + ")" ;
this.html(result);
}else{
result += "$" + field;
}
this.html(result);
});
Thank You