Hi
I'm having an issue.
take a look at my txt file
I'm trying to make a Credentials in the drop down view - Output of Credentials type data file.
Weird thing is i'm able to output 17 of the 19 Credentials minus the top two.
there are tabs between the drop down view and output of credential
Im just really confused why the top two will not load into my template.
I've attached is the data file
and here is the java script i used in fusion pro
any help of direction would be really appreciated
thanks
Andrew
/*
1. we want to get the information from the xdf
2. count the qualifications filled
3. return the proper verbage
*/
XDF = new ExternalDataFileEx("FR_qualifications_XDF.txt", "\t");
var credArray1 = [];
var credArray2 = [];
var qualCounter = 0;
var degreeCounter = 0;
var intro = ", et je posséde le titre de ";
var intro2 = ", et je posséde les titres de ";
for (j = 1; j<4; j++){
myQual = "Qualifications"+j;
for (i = 0; i < XDF.recordCount+1; i++){
qualification = XDF.GetFieldValue(i, 0);
if (Field(myQual) == qualification && Field(myQual) != ""){
credArray1[qualCounter] = XDF.GetFieldValue(i, 1);
credArray2[qualCounter] = XDF.GetFieldValue(i, 2);
if (credArray2[qualCounter] == "degree"){
degreeCounter++;
}
qualCounter++
}
}
}
if (qualCounter == 1){
return intro + credArray1[0]+" "+credArray2[0]+".";
} else if (qualCounter == 2){
if (credArray2[0] == credArray2[1] && credArray2[0] != "degree") // both credential endings are the same and are not "degree"
return intro2 + credArray1[0]+","+credArray1[1]+" "+credArray2[0]+"s.";
else if (credArray2[0] == credArray2[1] && credArray2[0] == "degree") // both credential endings are the same and are "degree"
return intro2 + credArray1[0]+" "+credArray2[0]+", "+credArray1[1]+" "+credArray2[1]+".";
else // both credentials are not the same
return intro2 + credArray1[0]+" "+credArray2[0]+", "+credArray1[1]+" "+credArray2[1]+".";
} else if (qualCounter == 3){