Function - assigning a value to a field and calculations
Problem 1
I want to create function that looks like the one below but it doesn't work.
void namespace.function()
{
input.Total = input.A.toLong() + input.B.toLong();
}
input.A and B are dropdown boxes and everytime I select a value this function will be called to calculate the total. Also my form have different sections with different dropdowns.
Problem 2
How to do I count the non-numeric options(Options: 4,3,2,1,NA)? Because my calculator function also needs to know that to be able to compute only the numeric values. Knowing how many dropdowns I have and how many a number was selected can help me compute the average.
If this dropdown is numeric add but if it is not don't add them then divided by how many dropdowns with numeric values.
dropdown 1 = 2
dropdown 2 = 2
dropdown 3 = 2
dropdown 4 = NA
Should give me 6/3 or the sum of all numeric options is 6 divided by 3(options w/c are numeric excluding the NA)
Thanks