Copy link to clipboard
Copied
Need to display a blank unless v1 has a number entered. Currently v1 shows -30 with nothing entered. Please help. Thanks.
var v1 = Number(this.getField("AsFoundRow1").value);
var v2 = 30;
var v3 = (v1)+.0001;
var v4 = (v1)-.0001;
if (v1 ==""){
event.value = "";
}
if (v1 =>30)
{
event.value = (v3)-(v2);
}
if (v1<30)
{
event.value = (v4)-(v2);
}
Try this:
var s1 = this.getField("AsFoundRow1").valueAsString;
if (s1=="") event.value = "";
else {
var v1 = Number(s1);
// rest of code goes here
}
Copy link to clipboard
Copied
Try this:
var s1 = this.getField("AsFoundRow1").valueAsString;
if (s1=="") event.value = "";
else {
var v1 = Number(s1);
// rest of code goes here
}
Copy link to clipboard
Copied
Wow! Fast response and works perfectly. Learned something new today. Thank you try67.