Totaling a column of numbers derived with javascript and Reset a form not working
- May 24, 2021
- 2 replies
- 2656 views
Hi,
I am two issues from completing my document.
Issue one:
I need to total a column of numbers that are derived from fields with javascript behind them. I have tried to use the calculation field and have checked the boxeds of fields I want totals of and I do not get an accurate figure. Sometimes I get the message NaN (not a number). Do I have to make this request with javascript and what would it look like? Here is an example of the javascript I have behind one of the fields in the column to be totaled:
var v = this.getField("EDAssign01").valueAsString;
if (v=="HS - Activities Director") event.value = "5,705.00";
else if (v=="HS - All School Play - Director") event.value = "1,713.00";
else if (v=="HS - All School Play - Assistant Director") event.value = "914.00"; etc., etc
I have also attached a jpeg of what the form looks like.
Second Issue:
I have an action set up to "Reset a Form" on mouse up and have selected all of the fields in the document. It will not reset the fields that have multichoice dropdowns in them....any suggestions.
Thanks so much. I have learned a tremendous amount of information doing this!!