Creating and Printing Arrays in text fields
So this is one that has been stumping me for a bit. ive tried and failed just to get the script to add to and print from an array based on the value of drop down box. i am creating a document for instructors to use as a tool to generate the text that can be copy and pasted into a "report card". There are 6 assessments the students must complete throughout the course. All assessments are rated as either Met standard, Exceeded Standard, and Far Exceeded standard. I have all 6 assessments listed out and have a corresponding drop down list containing Met, Exceeded and Far Exceed. I have a field box below that i am trying to create a custom calculation script. What the end goal would be is to create a script that groups all of these items together in arrays by their test rating and prints it later on in a list. Here is a sample at what i am attempting, but only factors for 2 of the 6 tests and probably has a lot of issues:
var metArray = [];
var exceedArray = [];
var fexceedArray = [];
var Var1 = this.getField("Test1");
if(Var1 == "Met");{
metArray.push('Public Speaking');
}
else if(Var1 == "Exceed");{
exceedArray.push('Public Speaking');
}
else if(Var1 == "Far Exceed");{
fexceedArray.push('Public Speaking');
}
var Var2 = this.getField("Test2");
if(Var2 == "Met");{
metArray.push('ABC presentation');
}
else if(Var1 == "Exceed");{
exceedArray.push('ABC presentation');
}
else if(Var1 == "Far Exceed");{
fexceedArray.push('ABC presentation');
}
var Var30 = *** PRINT 'FAR EXCEEDED' ARRAY SEPARATED BY COMMA***
var Var20 = *** PRINT 'EXCEEDED' ARRAY SEPARATED BY COMMA***
var Var10 = ***PRINT 'MET' ARRAY SEPARATED BY COMMA***
event.value = this.getField("Name").valueAsString + " Far Exceeded the course standard during his: " + ***Var30*** + " evaluation." + this.getField("Name").valueAsString + " Exceeded the course standard during his: " + ***Var20*** + " evaluation." + this.getField("Name").valueAsString + " Met the course standard during his: " + ***Var10*** + " evaluation."
Printed version would look like:
Mr. Adobe far exceed the course standard during his Public Speaking, ABC Presentation, and DEF presentation evaluations. Mr. Adobe exceed the course standard during his 2nd essay evaluation.
Mr. Adobe met the course standard during his 1st essay, and final exam evaluations.
Any help to get the items to add to an array and to call upon it later would be amazing. ive gotten results close to what i need using python, (user prompts instead of drop down boxes) but JS is just not my strong suit.
