Set value of textbox based off of value in other fields
I have a form that has a Yes or No question, however, the Yes or No question is based off of the answer to FOUR different mapped fields. If ANY of those mapped fields populate a Y value then I want my textbox to have a Y entered, else "". I'm using the following script but I cannot get it to work.
var a = this.getField("APPLICANT_1_BANKRUPTCY").valueAsString;
var b = this.getField("APPLICANT_1_OUTSTANDING_JUDGMENTS").valueAsString;
var c = this.getField("APPLICANT_1_FORECLOSED_REPOSSESSED").valueAsString;
var d = this.getField("APPLICANT_1_PARTY_TO_LAWSUIT").valueAsString;
if (a=="N" && b=="N" && c=="N" && d=="N") event.value = "";
else event.value = "Y";
Also, the four mapped fields that the box is drawn off of map at different times, so if the first box comes in at N and the second at Y, then I need the box to populate Y, and I don't want it to change if the other 2 mapped fields come in at N. I also tried dabbling with an array script, but I'm self taught and am making a mess I think lol.
Any help would be appreciated!