Return a zero value if nothing is in Year field
Hi, I have a simple age calculator based on the year 2022 in one of my PDFs. If there's no data present in the year field, it automatically shows "2022" in the text.
This is my code:
// Get first field value
var v1 = getField("Year 1").value;
// Set this field value equal to the difference
event.value = 2022 - v1;
How do I get it to return a "zero" or no data, if the Year 1 field is left blank?
