//Secondary Custom code - START
//Drop-list which dynamically fills-in the ADDTL_ACCOUNT_NUMBER_i where ADDTL_ACCT_TYPE_1 of DEP and ADDTL_ACCT_MAJOR_1 of either CK up to 20
function fillAccountNumbers()
{
	var CSTM_ACCTNO_DROPLIST = this.getField("CSTM_ACCTNO_DROPLIST");//DROPLIST FIELDNAME
  //ADDTL_ACCT_TYPE_1 of DEP and ADDTL_ACCT_MAJOR_1 of either CK up to 20
	var ADDTL_ACCOUNT_NUMBER_1 = this.getField("ADDTL_ACCOUNT_NUMBER_1");
	var ADDTL_ACCT_TYPE_1 = this.getField("ADDTL_ACCT_TYPE_1");
	var ADDTL_ACCT_MAJOR_1 = this.getField("ADDTL_ACCT_MAJOR_1");	
  var ACCT_NO = this.getField("ACCT_NO");	
	

  var acctsArr = ["Select Account Number"];
  
	//Fill values in Droplist 1
    if (this.getField("ACCT_TYPE").value == "DEP" && this.getField("ACCT_MAJOR").value == "CK"){
      acctsArr.push(ACCT_NO.value);
    }
		var listIndex = 0;
		for (var i = 1; i <= 20; i++)
		{
			if (this.getField("ADDTL_ACCT_TYPE_" + i).value == "DEP" &&  this.getField("ADDTL_ACCT_MAJOR_" + i).value == "CK")
			{
				acctsArr.push(this.getField("ADDTL_ACCOUNT_NUMBER_" + i).value);
				listIndex++;
			}
		}

    CSTM_ACCTNO_DROPLIST.setItems(acctsArr);

}
//Secondary Custom code - End