Answered
I want to write an if, then statement where if the value of my text field I titled "Test" is 1 or greater, than the value "1" will be placed in the text field I am calculating. If the value of "Test" is 0 or "", then the value "0" will be placed in the text field I am calculating.
From other searches I have done, I have come up with the following script:
var f = this.getField("Test").value;
if (f.value >= 1)
event.value = 1;
else
event.value = 0;
Both text fields are formated to be numbers. I am sure that I am missing something simple! Please help!
Since you have defined "f" as having the value property of the "Test" field object, you can not get the value of the value.
var f = this.getField("Test").value;
if (f >= 1)
event.value = 1;
else
event.value = 0;or
if (this.getField("Test").value >= 1)
event.value = 1;
else
event.value = 0;
George Kaiser