Answer return as blank when input values are zero?
Hi there, I have this problem when a cell has value of zero, then the answer returned is blank.
I am not sure how to resolve this problem.
For example:

In the above image, I have applied the code below but it returns the answer as blank.
I expected the answer to be 1.1
which can be calculated by:
(top - bkg) / ((top-bkg)+(bottom-bkg)) *100
(0.1-0)/((0.1-0)+(9-0))*100
= 1.1
var v1 = Number(this.getField("Top").valueAsString);
var v2 = Number(this.getField("Bottom").valueAsString);
var v3 =
Number(this.getField("Bkg").valueAsString);
if(v3){
if(v1=="" || v2=="") event.value = "";else
event.value = (v1-v3)/((v2-v3)+(v1-v3))*100;}
else
event.value = "";
Any idea what's wrong with my code? Thanks
