Problems retrieving the Index of a value in an array
Good evening, I am creating an array that will allow total automation of our company's work.
However, I am running into the problem of not being able to find the Index of values, which are grabbed from the form fields in the PDF.
Here is my code:
this.importDataObject("MEDDIAGNOSISICD-10.txt", "C:\Users\dell\Documents\tab excel\MEDDIAGNOSISICD-10.txt");
var oFile = this.getDataObjectContents("MEDDIAGNOSISICD-10.txt");
var cFile = util.stringFromStream(oFile, "utf-8");
var fileArray = cFile.split('\n');
var Med = this.getField("Medications 1");
var Index = fileArray.indexOf("Med.value");
var Search = fileArray[Index.value];
console.println(Index);
The results always come back as "-1."
Any help would be greatly appreciated!
